Merge branch 'feature/fix-version' into develop
This commit is contained in:
commit
68b04de276
@ -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
|
@ -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
|
@ -1 +0,0 @@
|
||||
|
@ -1,4 +0,0 @@
|
||||
[console_scripts]
|
||||
semver = semver:main
|
||||
semver_get_version = semver.get_version:main
|
||||
|
@ -1 +0,0 @@
|
||||
bumpversion==0.5.3
|
@ -1 +0,0 @@
|
||||
semver
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user