Skip to content

Commit 27fb2c7

Browse files
committed
small changes to release to GH
Signed-off-by: Mohamed Belgaied Hassine <belgaied2@hotmail.com>
1 parent a2db53c commit 27fb2c7

File tree

2 files changed

+420
-1
lines changed

2 files changed

+420
-1
lines changed

Makefile

+15-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ TOOLS_BIN_DIR := $(abspath $(TOOLS_DIR)/$(BIN_DIR))
5252

5353
export PATH := $(abspath $(TOOLS_BIN_DIR)):$(PATH)
5454

55+
# GITHUB
56+
GH_VERSION := v2.40.1
57+
GH_BIN := gh
58+
GH := $(abspath $(TOOLS_BIN_DIR)/$(GH_BIN))
59+
# Repo
60+
GH_ORG_NAME ?= $ORG
61+
GH_REPO_NAME ?= cluster-api-provider-harvester
62+
GH_REPO ?= $(GH_ORG_NAME)/$(GH_REPO_NAME)
63+
5564
.PHONY: all
5665
all: build
5766

@@ -257,7 +266,7 @@ release-notes: $(RELEASE_DIR) $(GH)
257266
if [ -n "${PRE_RELEASE}" ]; then \
258267
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/rancher-sandbox/cluster-api-provider-harvester/issues/new)." > $(RELEASE_DIR)/CHANGELOG.md; \
259268
else \
260-
$(GH) api repos/$(ORG)/$(GH_REPO_NAME)/releases/generate-notes -F tag_name=$(VERSION) -F previous_tag_name=$(PREVIOUS_VERSION) --jq '.body' > $(RELEASE_DIR)/CHANGELOG.md; \
269+
$(GH) api repos/$(ORG)/$(GH_REPO_NAME)/releases/generate-notes -F tag_name=$(RELEASE_TAG) -F previous_tag_name=$(PREVIOUS_TAG) --jq '.body' > $(RELEASE_DIR)/CHANGELOG.md; \
261270
fi
262271

263272
##@ Build Dependencies
@@ -327,3 +336,8 @@ clean-release-git: ## Restores the git files usually modified during a release
327336
.PHONY: clean-generated-yaml
328337
clean-generated-yaml: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1alpha4"
329338
(IFS=','; for i in $(SRC_DIRS); do find $$i -type f -name '*.yaml' -exec rm -f {} \;; done)
339+
340+
$(GH): # Download GitHub cli into the tools bin folder
341+
hack/ensure-gh.sh \
342+
-b $(TOOLS_BIN_DIR) \
343+
$(GH_VERSION)

0 commit comments

Comments
 (0)