From 7bacf4a5f0026d271e17b1558153bebfe9a40cde Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 13 Mar 2021 13:22:16 -0800 Subject: [PATCH] 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 --- .github/workflows/changelog.yaml | 9 +++++++++ CHANGELOG.md | 27 +++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index dc52daed..c8d184ec 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e003e80..17059d78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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:** @@ -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) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7.1-beta...v2.7.1) +**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)) + +## [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:**