From 70894866c015b8a37e7c04619fd9a8c98a52875d Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Thu, 15 Aug 2024 08:53:18 +0200 Subject: [PATCH] build: bump git-cliff to 2.4 and remove history before 1.0 from changelog --- scripts/release/cliff-pre.toml | 61 ---------------------------------- scripts/release/cliff.toml | 6 +++- scripts/release/release.sh | 12 +++++-- 3 files changed, 14 insertions(+), 65 deletions(-) delete mode 100644 scripts/release/cliff-pre.toml diff --git a/scripts/release/cliff-pre.toml b/scripts/release/cliff-pre.toml deleted file mode 100644 index 14331286f..000000000 --- a/scripts/release/cliff-pre.toml +++ /dev/null @@ -1,61 +0,0 @@ -# configuration file for git-cliff (0.1.0) - -[changelog] -# changelog header -header = """ -# Changelog -All notable changes to this project will be documented in this file.\n -""" -# template for the changelog body -# https://tera.netlify.app/docs/#introduction -body = """ -{% if version %}\ - ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} -{% else %}\ - ## [unreleased] -{% endif %}\ -{% for group, commits in commits | group_by(attribute="group") %} - ### {{ group | upper_first }} - {% for commit in commits %} - - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ - {% endfor %} -{% endfor %}\n -""" -# remove the leading and trailing whitespaces from the template -trim = true -# changelog footer -footer = """ - -""" - -[git] -# parse the commits based on https://www.conventionalcommits.org -conventional_commits = true -# filter out the commits that are not conventional -filter_unconventional = true -# regex for parsing and grouping commits -commit_parsers = [ - { message = "^feat", group = "Features" }, - { message = "^fix", group = "Bug Fixes" }, - { message = "^doc", group = "Documentation" }, - { message = "^perf", group = "Performance" }, - { message = "^refactor", group = "Refactor" }, - { message = "^style", group = "Styling" }, - { message = "^test", group = "Testing" }, - { message = "^chore\\(release\\): update changelog and bump version to", skip = true }, - { message = "^chore", group = "Miscellaneous Tasks" }, - { body = ".*security", group = "Security" }, -] -# filter out the commits that are not matched by commit parsers -filter_commits = false -# glob pattern for matching git tags -tag_pattern = 'v[0-9].[0-9]*' -# regex for skipping tags -# skip_tags = "v0.1.0-beta.1" -# regex for ignoring tags -# While skip_tags drop commits from the changelog, ignore_tags include ignored commits into the next tag. -ignore_tags = '' -# sort the tags topologically -topo_order = true -# sort the commits inside sections by oldest/newest order -sort_commits = "oldest" diff --git a/scripts/release/cliff.toml b/scripts/release/cliff.toml index 550800ea1..70d9b16e7 100644 --- a/scripts/release/cliff.toml +++ b/scripts/release/cliff.toml @@ -1,4 +1,4 @@ -# configuration file for git-cliff (0.1.0) +# configuration file for git-cliff (2.4.0) [changelog] # changelog header @@ -59,3 +59,7 @@ ignore_tags = 'v[0-9]\.[0-9]+\.[0-9]+-[a-z]+\.[0-9]+' topo_order = true # sort the commits inside sections by oldest/newest order sort_commits = "oldest" + +[remote.github] +owner = "dashpay" +repo = "tenderdash" diff --git a/scripts/release/release.sh b/scripts/release/release.sh index 053f16835..a21ef4b58 100755 --- a/scripts/release/release.sh +++ b/scripts/release/release.sh @@ -162,8 +162,9 @@ function generateChangelog { debug Generating CHANGELOG CLIFF_CONFIG="${REPO_DIR}/scripts/release/cliff.toml" + CLIFF_ARGS= if [[ "${RELEASE_TYPE}" = "prerelease" ]]; then - CLIFF_CONFIG="${REPO_DIR}/scripts/release/cliff-pre.toml" + CLIFF_ARGS="--ignore-tags='v[0-9]\.[0-9]+\.[0-9]+-[a-z]+\.[0-9]+'" fi echo 2>"${REPO_DIR}/CHANGELOG.md" @@ -172,12 +173,14 @@ function generateChangelog { -v "${REPO_DIR}/.git":/app/.git:ro \ -v "${CLIFF_CONFIG}":/cliff.toml:ro \ -v "${REPO_DIR}/CHANGELOG.md":/CHANGELOG.md \ - orhunp/git-cliff:0.10.0 \ + orhunp/git-cliff:2.4.0 \ --config /cliff.toml \ --output /CHANGELOG.md \ --tag "v${NEW_PACKAGE_VERSION}" \ + ${CLIFF_ARGS} \ --strip all \ - --verbose + --verbose \ + 'v1.0.0-dev.1..HEAD' } function updateVersionGo { @@ -376,6 +379,9 @@ configureDefaults parseArgs "$@" configureFinal +generateChangelog +exit 0 + if [[ -n "${CLEANUP}" ]]; then cleanup deleteRelease