Skip to content

Commit

Permalink
Add a prepare-release target…
Browse files Browse the repository at this point in the history
… and update the version to 0.1.0 to prepare the release to come.

Signed-off-by: Vincent Demeester <[email protected]>
  • Loading branch information
vdemeester authored and otaviof committed Oct 24, 2023
1 parent 13361f0 commit 37741db
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: task-git
version: 0.0.1
version: 0.1.0
description: |
This Task represents Git and is able to initialize and clone a remote
repository on the informed Workspace. It's likely to become the first `step`
on a Pipeline.
type: application
type: application
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# using the chart name and version from chart's metadata
CHART_NAME ?= $(shell awk '/^name:/ { print $$2 }' Chart.yaml)
CHART_VESION ?= $(shell awk '/^version:/ { print $$2 }' Chart.yaml)
CHART_VERSION ?= $(shell awk '/^version:/ { print $$2 }' Chart.yaml)

# release directory where the Tekton resources are rendered into.
RELEASE_DIR ?= /tmp/$(CHART_NAME)-$(CHART_VERSION)

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

# pepare a release
prepare-release:
mkdir -p $(RELEASE_DIR)/task/$(CHART_NAME) || true
helm template $(ARGS) . > $(RELEASE_DIR)/task/$(CHART_NAME)/$(CHART_NAME).yaml
cp README.md $(RELEASE_DIR)/task/$(CHART_NAME)/
go run github.com/openshift-pipelines/tektoncd-catalog/cmd/catalog-cd@main release --output release --version $(CHART_VERSION) $(RELEASE_DIR)/task/$(CHART_NAME)
@echo "Now you can release:"
@echo " git tag v$(CHART_VERSION) && git push v$(CHART_VERSION)"
@echo " gh release create v$(CHART_VERSION) --generate-notes"
@echo " gh release upload v$(CHART_VERSION) release/catalog.yaml"
@echo " gh release upload v$(CHART_VERSION) release/resources.tar.gz"

# packages the helm-chart as a single tarball, using it's name and version to compose the file
helm-package: clean
helm package $(ARGS) .
Expand All @@ -53,4 +68,4 @@ test-e2e: install
# and end-to-end) to avoid running the release workflow accidently
act: ARGS = --workflows=./.github/workflows/test.yaml
act:
act $(ARGS)
act $(ARGS)

0 comments on commit 37741db

Please sign in to comment.