now this can be a docker container and version a different repository that is on same file system

This commit is contained in:
Michael Gimbel
2017-02-23 22:11:55 +00:00
parent 867b4d7e63
commit c5a4c697f3
5 changed files with 47 additions and 5 deletions

34
semver.py Normal file
View File

@@ -0,0 +1,34 @@
import subprocess
def semver():
# setup git user
p = subprocess.Popen(['git', 'config', 'user.email',
'"versioner@semver.com"'], cwd='/application_repo')
p = subprocess.Popen(['git', 'config', 'user.name', '"Semantic Versioner"'],
cwd='/application_repo')
p.wait()
# version repo
p = subprocess.Popen(['bumpversion', 'patch'], cwd='/application_repo')
p.wait()
'''
' this will be difficult to do because we'd need to setup credentials in
' docker container for git remote repo access
'
# push versioning commit
p = subprocess.Popen(['git', 'push', 'origin', 'develop'],
cwd='/application_repo')
p.wait()
# push versioning tag
p = subprocess.Popen(['git', 'push', 'origin', '--tags'],
cwd='/application_repo')
p.wait()
'''
return None
if __name__ == '__main__':
semver()