Skip to content

Commit

Permalink
Use released catalog-cd instead of doing go run…
Browse files Browse the repository at this point in the history
… it should be way quicker.

Signed-off-by: Vincent Demeester <[email protected]>
  • Loading branch information
vdemeester authored and openshift-merge-bot[bot] committed Jan 26, 2024
1 parent 74608a3 commit 457991e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.env
/.bin
/.vscode/
/*.tgz
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
SHELL := /usr/bin/env bash
BIN = $(CURDIR)/.bin

OSP_VERSION ?= latest

# using the chart name and version from chart's metadata
CHART_NAME ?= $(shell awk '/^name:/ { print $$2 }' Chart.yaml)
CHART_VERSION ?= $(shell awk '/^version:/ { print $$2 }' Chart.yaml)
RELEASE_VERSION = v$(CHART_VERSION)

CATALOGCD_VERSION = v0.1.0

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

Expand All @@ -28,6 +33,13 @@ define render-template
@helm template $(ARGS) $(CHART_NAME) .
endef

$(BIN):
@mkdir -p $@

CATALOGCD = $(or ${CATALOGCD_BIN},${CATALOGCD_BIN},$(BIN)/catalog-cd)
$(BIN)/catalog-cd: $(BIN)
curl -fsL https://github.com/openshift-pipelines/catalog-cd/releases/download/v0.1.0/catalog-cd_0.1.0_linux_x86_64.tar.gz | tar xzf - -C $(BIN) catalog-cd

# renders the task resource file printing it out on the standard output
helm-template:
$(call render-template)
Expand All @@ -45,8 +57,7 @@ prepare-release:
.PHONY: release
release: prepare-release
pushd ${RELEASE_DIR} && \
go run github.com/openshift-pipelines/tektoncd-catalog/cmd/catalog-cd@main \
release \
$(CATALOGCD) release \
--output release \
--version $(CHART_VERSION) \
tasks/* \
Expand Down

0 comments on commit 457991e

Please sign in to comment.