Skip to content

Commit

Permalink
chore: Setup changelog tooling to not mangle old releases
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Oct 21, 2024
1 parent e49d5fa commit f60fbf5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 1 addition & 4 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ release semver: pristine keys
make rockspecs/decasify{,.nvim}-{{semver}}-1.rockspec
sed -i -e '/^version/s/".*"/"{{semver}}"/' Cargo.toml
env SEMVER={{semver}} sed -i -e "/^decasify =/s/\".*\"/\"${SEMVER%\.*}\"/" README.md
make decasify-{{semver}}.md
git checkout cl -- CHANGELOG.md
make decasify-{{semver}}.md
# make SEMVER={{semver}} CHANGELOG.md decasify-{{semver}}.md
make SEMVER={{semver}} CHANGELOG.md decasify-{{semver}}.md -B
cargo build
git add Cargo.{toml,lock} README.md CHANGELOG.md rockspecs/decasify{,.nvim}-{{semver}}-1.rockspec
git commit -m "chore: Release v{{semver}}"
Expand Down
7 changes: 4 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ release-preview:
$(GITCLIFF) --unreleased

CHANGELOG.md:
$(GITCLIFF) -o $@ -t $(TAG)
$(GITCLIFF) -p $@ --unreleased -t $(TAG)

decasify-%.md: CHANGELOG.md
$(SED) -e '/^## \[$*\]/,/^## \[/!d' $< | \
$(SED) -e '1,3d;N;$$!P;$$!D;$$d' | \
$(SED) -e '1s/^/Release v$*\n/' | \
$(SED) -e '/^#/d' -e '/^$$/d' | \
$(SED) -e 's/\*//g' | \
$(SED) -e '1s/^/Release v$*\n/' > $@
$(SED) -e '1a\\' > $@

rockspecs: $(DEV_SPEC) $(DEV_SPEC_NVIM) $(REL_SPEC) $(REL_SPEC_NVIM)

Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ AM_COND_IF([DEVELOPER_MODE], [
QUE_PROGVAR([wasmpack], [wasm-pack])
# Release tooling
QUE_PROGVAR([gitcliff], [git-cliff])
QUE_PROGVAR([typos], [typos])
QUE_PROGVAR([sponge])
QUE_PROGVAR([typos])
])

QUE_RUST_BOILERPLATE
Expand Down

0 comments on commit f60fbf5

Please sign in to comment.