Skip to content

Commit

Permalink
Changelog generator fixes
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
wren and micahellison committed Mar 13, 2021
1 parent 1c66ac2 commit 7bacf4a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
27 changes: 23 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Changelog

## [Unreleased](https://github.com/jrnl-org/jrnl/)

[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1...HEAD)
## [v2.8-beta](https://pypi.org/project/jrnl/v2.8-beta/) (2021-03-13)
[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.2-beta...HEAD)

**Implemented enhancements:**

Expand All @@ -21,8 +20,28 @@
- Bump keyring from 22.0.1 to 22.3.0 [\#1210](https://github.com/jrnl-org/jrnl/pull/1210) ([dependabot[bot]](https://github.com/apps/dependabot))
- Bump asteval from 0.9.22 to 0.9.23 [\#1209](https://github.com/jrnl-org/jrnl/pull/1209) ([dependabot[bot]](https://github.com/apps/dependabot))

## [v2.7.2-beta](https://pypi.org/project/jrnl/v2.7.2-beta/) (2021-03-06)
[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1...v2.7.2-beta)

**Implemented enhancements:**

- Add pypi project links [\#1197](https://github.com/jrnl-org/jrnl/issues/1197)
- Add `--config-override` feature [\#1169](https://github.com/jrnl-org/jrnl/pull/1169) ([sriniv27](https://github.com/sriniv27))

**Fixed bugs:**

- bash: syntax error near unexpected token `newline' at input \>\_\> [\#1208](https://github.com/jrnl-org/jrnl/issues/1208)
- `jrnl --format short` returns an error [\#1173](https://github.com/jrnl-org/jrnl/issues/1173)
- `jrnl --format pretty` returns an error [\#1172](https://github.com/jrnl-org/jrnl/issues/1172)
- Fix bug that prevented --format pretty and --format short from working [\#1177](https://github.com/jrnl-org/jrnl/pull/1177) ([sriniv27](https://github.com/sriniv27))

**Packaging:**

- Bump keyring from 22.0.1 to 22.3.0 [\#1210](https://github.com/jrnl-org/jrnl/pull/1210) ([dependabot[bot]](https://github.com/apps/dependabot))
- Bump asteval from 0.9.22 to 0.9.23 [\#1209](https://github.com/jrnl-org/jrnl/pull/1209) ([dependabot[bot]](https://github.com/apps/dependabot))

[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1-beta...v2.7.1)
## [v2.7.1](https://pypi.org/project/jrnl/v2.7.1/) (2021-02-27)
[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7...v2.7.1)

**Fixed bugs:**

Expand Down

0 comments on commit 7bacf4a

Please sign in to comment.