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

fix: new version string concat issue

wip: tagging issue fixing

wip: tagging issue fixing

wip: tagging issue fixing

wip: tagging issue fixing

wip: tagging issue fixing

wip: tagging issue fixing

wip: tagging issue fixing

wip: tagging issue fixing
parent 80a85af8
......@@ -45,7 +45,7 @@ def versioning(args, project_path: str):
version[2] += 1
# Rebuilding version string and write it back to config file. Also adding git tag
chlog['last'] = chlog['version']
chlog['version'] = 'v' + str(version[0] + '.' + str(version[1] + '.' + version[2]))
chlog['version'] = 'v' + str(version[0]) + '.' + str(version[1]) + '.' + str(version[2])
with open('chlog.json', 'w+') as version_file:
version_file.write(json.dumps(chlog))
add_git_tag(chlog['version'], None)
......
......@@ -82,15 +82,19 @@ def get_raw_commits(version: str) -> list[list[str]]:
def add_git_tag(version, commit_hash):
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], stderr=subprocess.STDOUT
['git', 'tag', '-a', version, '-m', 'Tag for version ' + version[1:]], stderr=subprocess.STDOUT
)
subprocess.check_output(
['git push'], stderr=subprocess.STDOUT
['git', 'push'], stderr=subprocess.STDOUT
)
else:
subprocess.check_output(
......
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