diff --git a/Makefile b/Makefile index 8d2fe1215a..e10970d5ce 100644 --- a/Makefile +++ b/Makefile @@ -99,6 +99,7 @@ ALL_ARCH ?= amd64 arm arm64 ppc64le s390x # main controller CORE_IMAGE_NAME ?= cluster-api-aws-controller CORE_CONTROLLER_IMG ?= $(REGISTRY)/$(CORE_IMAGE_NAME) +CORE_CONTROLLER_PROMOTED_IMG := $(PROD_REGISTRY)/$(CORE_IMAGE_NAME) CORE_CONTROLLER_ORIGINAL_IMG := gcr.io/k8s-staging-cluster-api-aws/cluster-api-aws-controller CORE_CONTROLLER_NAME := capa-controller-manager CORE_MANIFEST_FILE := infrastructure-components @@ -558,7 +559,7 @@ release-manifests: ## Release manifest files .PHONY: release-changelog release-changelog: $(GH) ## Generates release notes using Github release notes. - ./hack/releasechangelog.sh -v $(VERSION) -pv $(PREVIOUS_VERSION) -gh $(GH) -ghorg $(GH_ORG_NAME) -ghrepo $(GH_REPO_NAME) -cimg $(CORE_CONTROLLER_IMG) > $(RELEASE_DIR)/CHANGELOG.md + ./hack/releasechangelog.sh > $(RELEASE_DIR)/CHANGELOG.md .PHONY: release-binaries release-binaries: ## Builds the binaries to publish with a release diff --git a/hack/releasechangelog.sh b/hack/releasechangelog.sh index cbd1e057cd..f74cad29a9 100755 --- a/hack/releasechangelog.sh +++ b/hack/releasechangelog.sh @@ -17,22 +17,10 @@ set -o errexit set -o nounset set -o pipefail -while getopts v:pv:gh:ghorg:ghrepo:cimg: flag -do - case "${flag}" in - v) VERSION=${OPTARG};; - pv) PREVIOUS_VERSION=${OPTARG};; - gh) GH=${OPTARG};; - ghorg) GH_ORG_NAME=${OPTARG};; - ghrepo) GH_REPO_NAME=${OPTARG};; - cimg) CORE_CONTROLLER_IMG=${OPTARG};; - esac -done - echo "# Release notes for Cluster API Provider AWS (CAPA) $VERSION" echo "[Documentation](https://cluster-api-aws.sigs.k8s.io/)" echo "# Changelog since $PREVIOUS_VERSION" -$GH api repos/$GH_ORG_NAME/$GH_REPO_NAME/releases/generate-notes -F tag_name=$VERSION --jq '.body' -echo "**The image for this release is**: $CORE_CONTROLLER_IMG:$VERSION" +$GH api repos/$GH_ORG_NAME/$GH_REPO_NAME/releases/generate-notes -F tag_name=$VERSION -F previous_tag_name=$PREVIOUS_VERSION --jq '.body' +echo "**The image for this release is**: $CORE_CONTROLLER_PROMOTED_IMG:$VERSION" echo "Thanks to all our contributors!"