Commit 51ec4db1 authored by Francesco Witz's avatar Francesco Witz
Browse files

Merge branch 'fix' into 'main'

Minor fixes

See merge request !9
parents 22a7b412 83d80654
......@@ -2,11 +2,11 @@
All changes made will be listed in this file.
## [0.1.0] 03 March 2021
## [0.1.0] - 2021-03-01
### Added
* Setup script
## [0.0.0] 02 March 2021
## [0.0.0] - 2021-03-02
Project Created
\ No newline at end of file
......@@ -216,7 +216,10 @@ def check_formating(project_path: str, before_gen: bool):
os.chdir(project_path)
with open('chlog.json', 'r') as file:
chlog = json.load(file)
version: str = chlog['version']
if before_gen:
version: str = chlog['last']
else:
version: str = chlog['version']
commits: list[list[str]] = get_raw_commits(version)
format_pattern = re.compile("[a-z]+:(\s|\S)(?:[a-z]+(\s|\S))+")
......
......@@ -16,7 +16,7 @@ class File():
with open(self.__path, 'r') as file:
lines: list[str] = file.readlines()
# Creating regex to find section title
version_pattern = re.compile("[0-9]+.[0-9]+.[0-9]+")
version_pattern = re.compile("## \[[0-9].[0-9].[0-9]\] - [0-9]+-[0-9]+-[0-9]+")
# Checking the lines one by one
for l in lines:
# If we find a section title, return line index
......
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