diff --git a/Makefile b/Makefile index 8bfdd608f2..b9c4a51e08 100644 --- a/Makefile +++ b/Makefile @@ -572,11 +572,12 @@ release-alias-tag: ## Add the release alias tag to the last build tag .PHONY: generate-release-notes generate-release-notes: $(RELEASE_NOTES_DIR) $(RELEASE_NOTES) + # Reset the file + echo -n > $(RELEASE_NOTES_DIR)/$(RELEASE_TAG).md if [ -n "${PRE_RELEASE}" ]; then \ - echo ":rotating_light: This is a RELEASE CANDIDATE. Use it only for testing purposes. If you find any bugs, file an [issue](https://github.com/kubernetes-sigs/cluster-api/issues/new)." > $(RELEASE_NOTES_DIR)/$(RELEASE_TAG).md; \ - else \ - "$(RELEASE_NOTES)" --from=$(PREVIOUS_TAG) --prefix-area-label=false --add-kubernetes-version-support=false > $(RELEASE_NOTES_DIR)/$(RELEASE_TAG).md; \ + echo -e ":rotating_light: This is a RELEASE CANDIDATE. Use it only for testing purposes. If you find any bugs, file an [issue](https://github.com/kubernetes-sigs/cluster-api/issues/new).\n" >> $(RELEASE_NOTES_DIR)/$(RELEASE_TAG).md; \ fi + "$(RELEASE_NOTES)" --from=$(PREVIOUS_TAG) --prefix-area-label=false --add-kubernetes-version-support=false >> $(RELEASE_NOTES_DIR)/$(RELEASE_TAG).md .PHONY: promote-images promote-images: $(KPROMO)