Skip to content

Commit

Permalink
fix: Output Directory for catalog-cd
Browse files Browse the repository at this point in the history
Using `--output=.` creates empty files.
  • Loading branch information
otaviof authored and vdemeester committed Oct 30, 2023
1 parent 4bd76de commit 7c271d8
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ SHELL := /usr/bin/env bash
# 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)

# bats entry point and default flags
BATS_CORE = ./test/.bats/bats-core/bin/bats
Expand Down Expand Up @@ -104,21 +105,25 @@ release: prepare-release
pushd ${RELEASE_DIR} && \
go run github.com/openshift-pipelines/tektoncd-catalog/cmd/catalog-cd@main \
release \
--output . \
--output release \
--version $(CHART_VERSION) \
tasks/* \
; \
popd

# tags the repository with the RELEASE_VERSION and pushes to "origin"
git-tag-release-version:
if ! git rev-list "${RELEASE_VERSION}".. >/dev/null; then \
git tag "$(RELEASE_VERSION)" && \
git push origin --tags; \
fi

# rolls out the current Chart version as the repository release version, uploads the release
# payload prepared to GitHub (using gh)
github-release: RELEASE_VERSION = v$(CHART_VERSION)
github-release: release
git tag $(RELEASE_VERSION) && \
git push origin --tags && \
gh release create $(RELEASE_VERSION) --generate-notes && \
gh release upload $(RELEASE_VERSION) $(RELEASE_DIR)/catalog.yaml && \
gh release upload $(RELEASE_VERSION) $(RELEASE_DIR)/resources.tar.gz
github-release: git-tag-release-version release
gh release create $(RELEASE_VERSION) --generate-notes && \
gh release upload $(RELEASE_VERSION) $(RELEASE_DIR)/release/catalog.yaml && \
gh release upload $(RELEASE_VERSION) $(RELEASE_DIR)/release/resources.tar.gz

# renders and installs the resources (task)
install:
Expand Down

0 comments on commit 7c271d8

Please sign in to comment.