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 diff --git a/semver/__init__.py b/semver/__init__.py index bb744b0..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 @@ -39,10 +39,8 @@ 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() - print("Main branch is "+branch) + br = b.stdout.read().decode('utf-8').rstrip() + print('Main branch is ' + branch) matches = self.GET_COMMIT_MESSAGE.search(message) if matches: if str(matches.group(4)) == branch: @@ -50,16 +48,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'