Skip to content

Commit

Permalink
Merge pull request #3388 from sedefsavas/changelog-fix
Browse files Browse the repository at this point in the history
Fix for release log creation script
  • Loading branch information
k8s-ci-robot authored Apr 11, 2022
2 parents 2483d41 + e324c46 commit 1404c05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 2 additions & 14 deletions hack/releasechangelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"

0 comments on commit 1404c05

Please sign in to comment.