Compare commits

..

No commits in common. "c2f3602163e9bbe860d6ecbf7543e63ed8f90240" and "98268ffe0abe071b79a854e8b4f081d65decc8ec" have entirely different histories.

3 changed files with 10 additions and 16 deletions

2
.gitignore vendored
View File

@ -2,4 +2,4 @@
bin bin
*.txt *.txt
artifacts artifacts
draft_notes.md bin

View File

@ -25,7 +25,7 @@ fmt:
.PHONY: lint .PHONY: lint
lint: lint:
golangci-lint run --timeout 3m --verbose golangci-lint run
.PHONY: build .PHONY: build
build: build:

View File

@ -49,20 +49,14 @@ def draft():
# Get the current and previous tags # Get the current and previous tags
tags = subprocess.check_output(["git", "tag", "--sort=creatordate"], text=True) tags = subprocess.check_output(["git", "tag", "--sort=creatordate"], text=True)
if tags: tags = [tag for tag in tags.split("\n") if tag]
tags = [tag for tag in tags.split("\n") if tag] tags.reverse()
tags.reverse() current_tag, previous_tag, *_ = tags
current_tag, previous_tag, *_ = tags formatted_lines = subprocess.check_output(["git", "log", f"{current_tag}...{previous_tag}", f'--pretty=format:"* %s"'], text=True)
formatted_lines = subprocess.check_output(["git", "log", f"{current_tag}...{previous_tag}", f'--pretty=format:"* %s"'], text=True) lines = "\n".join([line.replace("\"", "") for line in formatted_lines.split("\n") if all(["merge" not in line.lower(), "changelog.md" not in line.lower()])])
lines = "\n".join([line.replace("\"", "") for line in formatted_lines.split("\n") if all(["merge" not in line.lower(), "changelog.md" not in line.lower()])]) fw.write(lines)
fw.write(lines) fw.write("\n\n")
fw.write("\n\n") fw.write(f"Compare between recent changes: [{previous_tag[1:]}...{current_tag[1:]}]({remote_url}/compare/{previous_tag}...{current_tag})")
fw.write(f"Compare between recent changes: [{previous_tag[1:]}...{current_tag[1:]}]({remote_url}/compare/{previous_tag}...{current_tag})")
else:
# first tag
formatted_lines = subprocess.check_output(["git", "log", f'--pretty=format:"* %s"'], text=True)
lines = "\n".join([line.replace("\"", "") for line in formatted_lines.split("\n") if all(["merge" not in line.lower(), "changelog.md" not in line.lower()])])
fw.write(lines)
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
print(f"Command failed with return code {e.returncode}") print(f"Command failed with return code {e.returncode}")