diff --git a/.gitignore b/.gitignore index df70e69..7149b54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.env +/.git /.vscode/ /*.tgz diff --git a/Makefile b/Makefile index 5b49a0d..e0aed1e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ SHELL := /usr/bin/env bash +BIN = $(CURDIR)/.bin OSP_VERSION ?= latest @@ -10,6 +11,8 @@ RELEASE_VERSION = v$(CHART_VERSION) # release directory where the Tekton resources are rendered into. RELEASE_DIR ?= /tmp/$(CHART_NAME)-$(CHART_VERSION) +CATALOGCD_VERSION = v0.1.0 + # bats entry point and default flags BATS_CORE = ./test/.bats/bats-core/bin/bats BATS_FLAGS ?= --print-output-on-failure --show-output-of-passing-tests --verbose-run @@ -35,6 +38,14 @@ 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) @@ -52,8 +63,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/* \