Skip to content

Commit

Permalink
backport of commit e7993e3
Browse files Browse the repository at this point in the history
  • Loading branch information
jm96441n committed Sep 12, 2024
1 parent 83f09af commit 27c6348
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -642,3 +642,4 @@ gen-changelog: ## Generate changelog entry for the current branch based on the c
.PHONY: help
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

27 changes: 27 additions & 0 deletions build-support/scripts/gen-changelog-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#! /bin/bash

set -eo pipefail

curdir=$(pwd)
if [[ ! $curdir == *"enterprise"* ]]; then
echo "This script should be run from the enterprise directory."
exit 1
fi

LAST_RELEASE_GIT_TAG="$1"

if [ -z "$LAST_RELEASE_GIT_TAG" ]; then
read -p "Enter the last release git tag (vX.Y.Z): " LAST_RELEASE_GIT_TAG
fi

if [ -z "$LAST_RELEASE_GIT_TAG" ]; then
echo "Last release git tag is required."
exit 1
fi

if [[ ! $LAST_RELEASE_GIT_TAG == v* ]]; then
echo "Last release git tag should start with 'v'."
exit 1
fi

go run github.com/hashicorp/go-changelog/cmd/changelog-build@latest -last-release ${LAST_RELEASE_GIT_TAG}+ent -entries-dir .changelog/ -changelog-template .changelog/changelog.tmpl -note-template .changelog/note.tmpl -this-release $(git rev-parse HEAD)

0 comments on commit 27c6348

Please sign in to comment.