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

Merge branch 'fix' into 'main'

Minor fixes

See merge request !4
parents e1801196 57894942
......@@ -15,7 +15,6 @@ def generate_changelog(project_path: str):
"""
Method used to generate a changelog based on git commit
"""
print(project_path)
check_update() # Checking if an update is available
check_chlog(project_path=project_path) # Checking if the config file is present on the project directory
print("Beginning changelog generation... 🛠")
......@@ -27,7 +26,7 @@ def generate_changelog(project_path: str):
# Get the last version in chlog.json to get the appropriate commit
with open("chlog.json", "r") as chlog_file:
chlog = json.load(chlog_file)
version = chlog["last-version"]
version = chlog["last"]
commits = get_formatted_commits(version)
# Check if changelog file exist
if not os.path.exists("CHANGELOG.md"):
......@@ -61,8 +60,11 @@ def versioning(args, project_path: str):
# Depending on the argument, updating the correct part of the version
if args == 'n':
version[0] += 1
version[1] = 0
version[2] = 0
elif args == 'u':
version[1] += 1
version[2] = 0
elif args == 'f':
version[2] += 1
# Rebuilding version string and write it back to config file. Also adding git tag
......
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