mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 21:46:13 +02:00
Changelog generator fixes
There were several problems that this fixes: - shallow fetch broke merging to release branch - bad changelog was only outputting error msg (not exiting) - latest version being on first line deleted itself and broke the changelog updates This also has manual fixes to the changelog to bring it up to date. Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
parent
1c66ac2da2
commit
7bacf4a5f0
2 changed files with 32 additions and 4 deletions
9
.github/workflows/changelog.yaml
vendored
9
.github/workflows/changelog.yaml
vendored
|
@ -85,6 +85,13 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $tagline == 1 ]]; then
|
||||
echo "::error::Something is wrong."
|
||||
echo "::error::The latest release ${SINCE_TAG} is the first line in the changelog,"
|
||||
echo "::error::but the h1 '# Changelog' should always be the first line."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -i "1,$(expr $tagline - 1)d" "$FILENAME"
|
||||
# delete generated line (or it will be added multiple times)
|
||||
sed -i '/This Changelog was automatically generated by/d' "$FILENAME"
|
||||
|
@ -124,6 +131,7 @@ jobs:
|
|||
git diff
|
||||
if [[ $(grep -c '^# Changelog$' "$FILENAME") != 1 ]]; then
|
||||
echo '::error::Something is wrong with the changelog.'
|
||||
exit 1
|
||||
fi
|
||||
SOMETHING_CHANGED=false
|
||||
git diff --exit-code || SOMETHING_CHANGED=true
|
||||
|
@ -142,6 +150,7 @@ jobs:
|
|||
- name: Merge to Release branch
|
||||
if: env.FULL_RELEASE == 'true'
|
||||
run: |
|
||||
git fetch --unshallow origin
|
||||
git checkout release
|
||||
git merge --ff-only $BRANCH
|
||||
git push origin release
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue