mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 03:42:25 +03:00
;tools: just changelogs-finalise, changelogs-catchup
This commit is contained in:
parent
b572d6b1ca
commit
2d1d3ac006
22
Justfile
22
Justfile
@ -812,17 +812,29 @@ changelogs *OPTS:
|
||||
changelogs-reset:
|
||||
git checkout CHANGES.md */CHANGES.md
|
||||
|
||||
# Finalise changelogs for a full release today. Run on release branch.
|
||||
# Set changelog headings to the specified commit, or HEAD. Run on release branch.
|
||||
changelogs-catchup *COMMIT:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
just _on-release-branch
|
||||
C={{ if COMMIT == '' { `git log -1 --pretty=%h --abbrev=8` } else { COMMIT } }}
|
||||
for p in $PACKAGES; do \
|
||||
sed -i "0,/^# /s/^# .*$/# $C/" $p/CHANGES.md; \
|
||||
done
|
||||
sed -i "0,/^# /s/^# .*$/# $C/" CHANGES.md
|
||||
echo "Changelog headings have been set to $C"
|
||||
|
||||
# Set changelog headings for a full release today. Run on release branch.
|
||||
changelogs-finalise:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
just _on-release-branch
|
||||
date=`gdate -I`
|
||||
for p in $PACKAGES; do \
|
||||
sed -i "0,/^# /s/^# .*$/# `gdate -I` `cat $p/.version`/" $p/CHANGES.md; \
|
||||
sed -i "0,/^# /s/^# .*$/# $date `cat $p/.version`/" $p/CHANGES.md; \
|
||||
done
|
||||
sed -i "0,/^# /s/^# .*$/# `gdate -I` `cat .version`/" CHANGES.md
|
||||
git commit -m ";doc: finalise changelogs for `cat .version`" CHANGES.md */CHANGES.md
|
||||
echo "Changelogs are finalised for release!"
|
||||
sed -i "0,/^# /s/^# .*$/# $date `cat .version`/" CHANGES.md
|
||||
git commit -m ";doc: finalise changelogs for `cat .version` on $date" CHANGES.md */CHANGES.md
|
||||
|
||||
# see also Shake.hs
|
||||
# http://www.haskell.org/haddock/doc/html/invoking.html
|
||||
|
Loading…
Reference in New Issue
Block a user