rochacbruno / python-project-template

DO NOT FORK, CLICK ON "Use this template" - A github template to start a Python Project - this uses github actions to generate your project based on the template.
https://github.com/rochacbruno/python-project-template/generate
The Unlicense
1.06k stars 157 forks source link

HISTORY.md newest position is called (unreleased) #18

Open lipowskm opened 2 years ago

lipowskm commented 2 years ago

When making a new release, HISTORY.md newest position is called (unreleased) instead of the newest version.

I've created a simple workaround by modifying release under Makefile.

Instead of calling:

@$(ENV_PREFIX)gitchangelog  > HISTORY.md

You could perhaps do something like:

@$(ENV_PREFIX)gitchangelog | sed "s/(unreleased)/$${TAG} ($$(date +%Y-%m-%d))/g" > HISTORY.md

Furthermore, you could get rid of all the release commits from changelog:

@$(ENV_PREFIX)gitchangelog | sed "s/(unreleased)/$${TAG} ($$(date +%Y-%m-%d))/g" | grep -v "Release: version" > HISTORY.md

This way HISTORY.md contains relevant commits only.

kevin-kruse commented 3 months ago

Yeah, got the same question: How do you tag a git commit, but append the history to this very git commit afterwards (with gitchangelog)?