From 8a7bcd4764e243037c7b34e64943bd9c09504490 Mon Sep 17 00:00:00 2001 From: Derek DeJonghe Date: Fri, 25 May 2018 15:06:26 -0400 Subject: [PATCH 1/4] remove egg info --- semver.egg-info/PKG-INFO | 43 ---------------------------- semver.egg-info/SOURCES.txt | 10 ------- semver.egg-info/dependency_links.txt | 1 - semver.egg-info/entry_points.txt | 4 --- semver.egg-info/requires.txt | 1 - semver.egg-info/top_level.txt | 1 - 6 files changed, 60 deletions(-) delete mode 100644 semver.egg-info/PKG-INFO delete mode 100644 semver.egg-info/SOURCES.txt delete mode 100644 semver.egg-info/dependency_links.txt delete mode 100644 semver.egg-info/entry_points.txt delete mode 100644 semver.egg-info/requires.txt delete mode 100644 semver.egg-info/top_level.txt diff --git a/semver.egg-info/PKG-INFO b/semver.egg-info/PKG-INFO deleted file mode 100644 index 249873a..0000000 --- a/semver.egg-info/PKG-INFO +++ /dev/null @@ -1,43 +0,0 @@ -Metadata-Version: 1.1 -Name: semver -Version: 1.0.5 -Summary: Automatic Semantic Versioner -Home-page: https://git-codecommit.us-east-1.amazonaws.com/v1/repos/auto-semver -Author: RightBrain Networks -Author-email: cloud@rightbrainnetworks.com -License: Apache2.0 -Description: Semantic Versioning - =================== - - Usage - ===== - - FULL\_PATH\_TO\_LOCAL\_REPO gives container access to repo to be versioned - ========================================================================== - - FULL\_PATH\_TO\_SSH\_FOLDER gives container access to ssh keys to be able to push repo - ====================================================================================== - - docker build -t semver . docker run -v - FULL\_PATH\_TO\_LOCAL\_REPO:/application\_repo -v - FULL\_PATH\_TO\_SSH\_FOLDER:/root/.ssh semver - - after this finishes must go to FULL\_PATH\_TO\_LOCAL\_REPO and push yourself - ============================================================================ - - git push origin develop git push origin --tags - -Keywords: Semantic Version -Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha -Classifier: Intended Audience :: Developers -Classifier: Intended Audience :: System Administrators -Classifier: Topic :: Software Development :: Build Tools -Classifier: License :: OSI Approved :: Apache Software License -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: 3.6 diff --git a/semver.egg-info/SOURCES.txt b/semver.egg-info/SOURCES.txt deleted file mode 100644 index e728efc..0000000 --- a/semver.egg-info/SOURCES.txt +++ /dev/null @@ -1,10 +0,0 @@ -README.rst -setup.py -semver/__init__.py -semver/get_version.py -semver.egg-info/PKG-INFO -semver.egg-info/SOURCES.txt -semver.egg-info/dependency_links.txt -semver.egg-info/entry_points.txt -semver.egg-info/requires.txt -semver.egg-info/top_level.txt \ No newline at end of file diff --git a/semver.egg-info/dependency_links.txt b/semver.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/semver.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/semver.egg-info/entry_points.txt b/semver.egg-info/entry_points.txt deleted file mode 100644 index c12868d..0000000 --- a/semver.egg-info/entry_points.txt +++ /dev/null @@ -1,4 +0,0 @@ -[console_scripts] -semver = semver:main -semver_get_version = semver.get_version:main - diff --git a/semver.egg-info/requires.txt b/semver.egg-info/requires.txt deleted file mode 100644 index 94ed009..0000000 --- a/semver.egg-info/requires.txt +++ /dev/null @@ -1 +0,0 @@ -bumpversion==0.5.3 diff --git a/semver.egg-info/top_level.txt b/semver.egg-info/top_level.txt deleted file mode 100644 index f4ded63..0000000 --- a/semver.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -semver From b989cf6a042268d0c0985141fae4c247c56f9eb7 Mon Sep 17 00:00:00 2001 From: Derek DeJonghe Date: Fri, 25 May 2018 15:07:36 -0400 Subject: [PATCH 2/4] space around + and single quote non interpolated strings --- semver/__init__.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/semver/__init__.py b/semver/__init__.py index bb744b0..26b8ca7 100644 --- a/semver/__init__.py +++ b/semver/__init__.py @@ -42,7 +42,7 @@ class SemVer(object): br = b.stdout.read().decode('utf-8') #remove newline branch=br.rstrip() - print("Main branch is "+branch) + print('Main branch is ' + branch) matches = self.GET_COMMIT_MESSAGE.search(message) if matches: if str(matches.group(4)) == branch: @@ -50,16 +50,11 @@ class SemVer(object): else: self.merged_branch = matches.group(4) self.main_branch = branch - #print("group1 "+matches.group(1)) - #print("group2 "+matches.group(2)) - #print("group3 "+matches.group(3)) - #print("group4 "+matches.group(4)) - return bool(matches) # based on branches involved see what type of versioning should be done def get_version_type(self): - print("Merged branch is "+self.merged_branch) + print('Merged branch is ' + self.merged_branch) for prefix in self.major_branches: if self.merged_branch.startswith(prefix + '/'): self.version_type = 'major' From 7323af1ad52048808f34f7d2e35d834fa9aef107 Mon Sep 17 00:00:00 2001 From: Derek DeJonghe Date: Fri, 25 May 2018 15:08:42 -0400 Subject: [PATCH 3/4] combine line 42 and 44 --- semver/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/semver/__init__.py b/semver/__init__.py index 26b8ca7..db7a358 100644 --- a/semver/__init__.py +++ b/semver/__init__.py @@ -39,9 +39,7 @@ class SemVer(object): b = subprocess.Popen(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], stdout=subprocess.PIPE, cwd='.') message = str(p.stdout.read()) - br = b.stdout.read().decode('utf-8') - #remove newline - branch=br.rstrip() + br = b.stdout.read().decode('utf-8').rstrip() print('Main branch is ' + branch) matches = self.GET_COMMIT_MESSAGE.search(message) if matches: From b86ae42eb02b7b5df27cf82b191bb577ae514234 Mon Sep 17 00:00:00 2001 From: Derek DeJonghe Date: Fri, 25 May 2018 15:10:05 -0400 Subject: [PATCH 4/4] rest of comments resolved --- semver/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semver/__init__.py b/semver/__init__.py index db7a358..6c3a72d 100644 --- a/semver/__init__.py +++ b/semver/__init__.py @@ -11,7 +11,7 @@ version = "1.0.5" class SemVer(object): GET_COMMIT_MESSAGE = re.compile(r"Merge (branch|pull request) '?(.+)'? (into|from) ([\w/-]+)") - #Merge pull request #1 from RightBrain-Networks/feature/PLAT-185-versioning + # Merge pull request #1 from RightBrain-Networks/feature/PLAT-185-versioning def __init__(self): self.merged_branch = None