Commit ce9fd37b authored by Francesco Witz's avatar Francesco Witz
Browse files

fix: git tag wrongly passed params

parent a4cf4036
......@@ -86,19 +86,15 @@ def add_git_tag(version: str, commit_hash: str):
""" Method that add a git tag on the last commit or to a specific commit """
# Simply executing the git tag commands. If commit_hash is None, we apply the tag to the last commit
if commit_hash == None:
print(os.getcwd())
subprocess.call(
['git', 'tag'], stderr=subprocess.STDOUT
)
subprocess.check_output(
['git', 'tag', '-a', version, '-m', 'Tag for version ' + version[1:]], stderr=subprocess.STDOUT
)
subprocess.check_output(
['git', 'push'], stderr=subprocess.STDOUT
['git', 'push', '--tags'], stderr=subprocess.STDOUT
)
else:
subprocess.check_output(
['git', 'tag', '-a ' + version, '-m Tag for version ' + version, ' ' + commit_hash], stderr=subprocess.STDOUT
['git', 'tag', '-a', version, '-m', 'Tag for version ' + version, ' ' + commit_hash], stderr=subprocess.STDOUT
)
......@@ -106,10 +102,10 @@ def remove_git_tag(version):
""" Method that remove a git tag from the repo """
# Removing the specific tag from the local repo and from the distant one
subprocess.check_output(
['git', 'tag', '-d ' + version], stderr=subprocess.STDOUT
['git', 'tag', '-d', version], stderr=subprocess.STDOUT
)
subprocess.check_output(
['git', 'push', '--delete origin ' + version], stderr=subprocess.STDOUT
['git', 'push', '--delete origin', version], stderr=subprocess.STDOUT
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment