Skip to content

Commit 37741db

Browse files
vdemeesterotaviof
authored andcommitted
Add a prepare-release target…
… and update the version to 0.1.0 to prepare the release to come. Signed-off-by: Vincent Demeester <[email protected]>
1 parent 13361f0 commit 37741db

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
name: task-git
3-
version: 0.0.1
3+
version: 0.1.0
44
description: |
55
This Task represents Git and is able to initialize and clone a remote
66
repository on the informed Workspace. It's likely to become the first `step`
77
on a Pipeline.
8-
type: application
8+
type: application

Makefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# using the chart name and version from chart's metadata
22
CHART_NAME ?= $(shell awk '/^name:/ { print $$2 }' Chart.yaml)
3-
CHART_VESION ?= $(shell awk '/^version:/ { print $$2 }' Chart.yaml)
3+
CHART_VERSION ?= $(shell awk '/^version:/ { print $$2 }' Chart.yaml)
4+
5+
# release directory where the Tekton resources are rendered into.
6+
RELEASE_DIR ?= /tmp/$(CHART_NAME)-$(CHART_VERSION)
47

58
# bats entry point and default flags
69
BATS_CORE = ./test/.bats/bats-core/bin/bats
@@ -30,6 +33,18 @@ helm-template:
3033
install:
3134
$(call render-template) |kubectl $(ARGS) apply -f -
3235

36+
# pepare a release
37+
prepare-release:
38+
mkdir -p $(RELEASE_DIR)/task/$(CHART_NAME) || true
39+
helm template $(ARGS) . > $(RELEASE_DIR)/task/$(CHART_NAME)/$(CHART_NAME).yaml
40+
cp README.md $(RELEASE_DIR)/task/$(CHART_NAME)/
41+
go run github.com/openshift-pipelines/tektoncd-catalog/cmd/catalog-cd@main release --output release --version $(CHART_VERSION) $(RELEASE_DIR)/task/$(CHART_NAME)
42+
@echo "Now you can release:"
43+
@echo " git tag v$(CHART_VERSION) && git push v$(CHART_VERSION)"
44+
@echo " gh release create v$(CHART_VERSION) --generate-notes"
45+
@echo " gh release upload v$(CHART_VERSION) release/catalog.yaml"
46+
@echo " gh release upload v$(CHART_VERSION) release/resources.tar.gz"
47+
3348
# packages the helm-chart as a single tarball, using it's name and version to compose the file
3449
helm-package: clean
3550
helm package $(ARGS) .
@@ -53,4 +68,4 @@ test-e2e: install
5368
# and end-to-end) to avoid running the release workflow accidently
5469
act: ARGS = --workflows=./.github/workflows/test.yaml
5570
act:
56-
act $(ARGS)
71+
act $(ARGS)

0 commit comments

Comments
 (0)