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 <