From 3455a8e8185ba25777784d392d6150a4a7e2d4a9 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 16 Mar 2021 20:38:57 +0300 Subject: [PATCH] chore: use new release tool for changelogs and release notes This replaces `git-chglog` with the `talos-systems/release-tool`. We need to make sure we update `hack/release.toml` as we do PRs to make sure we highlight any important feature or update as we go. Signed-off-by: Andrey Smirnov --- hack/release.sh | 20 +++++++++++++------- hack/release.toml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 hack/release.toml diff --git a/hack/release.sh b/hack/release.sh index d25bf0d9a2..73db92bdbc 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -2,11 +2,16 @@ set -e +RELEASE_TOOL_IMAGE="ghcr.io/talos-systems/release-tool:latest" + +function release-tool { + docker pull "${RELEASE_TOOL_IMAGE}" >/dev/null + docker run --rm -w /src -v "${PWD}":/src:ro "${RELEASE_TOOL_IMAGE}" -l -d -n -t "${1}" ./hack/release.toml +} + function changelog { if [ "$#" -eq 1 ]; then - git-chglog --output CHANGELOG.md -c ./hack/chglog/config.yml --tag-filter-pattern "^${1}" "${1}.0-alpha.1.." - elif [ "$#" -eq 0 ]; then - git-chglog --output CHANGELOG.md -c ./hack/chglog/config.yml + echo "$(release-tool ${1})\n\n$(cat CHANGELOG.md)" > CHANGELOG.md else echo 1>&2 "Usage: $0 changelog [tag]" exit 1 @@ -14,9 +19,9 @@ function changelog { } function release-notes { - git-chglog --output ${1} -c ./hack/chglog/config.yml "${2}" + release-tool "${2}" > "${1}" - echo -e '## Images\n\n```' >> ${1} + echo -e '\n## Images\n\n```' >> ${1} ${ARTIFACTS}/talosctl-linux-amd64 images >> ${1} echo -e '```\n' >> ${1} } @@ -50,9 +55,10 @@ then else cat <