|
| 1 | +.DEFAULT_GOAL := help |
| 2 | + |
| 3 | +ifndef VERSION |
| 4 | + VERSION := "0.0.1-dummy.1" |
| 5 | +endif |
| 6 | + |
| 7 | +ifndef CLONE_DIR |
| 8 | + CLONE_DIR := $(shell mktemp -d) |
| 9 | +endif |
| 10 | + |
| 11 | +help: ## Show all Makefile targets |
| 12 | + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
| 13 | + |
| 14 | +lint: |
| 15 | + ct lint --all |
| 16 | + |
| 17 | +cleanup: |
| 18 | + rm yatai-image-builder-crds-*.tgz || true |
| 19 | + |
| 20 | +release: cleanup |
| 21 | + helm package . --version ${VERSION} --app-version ${VERSION} |
| 22 | + if [ ${GITHUB_ACTIONS} ]; then git config --global user.name "github-actions[bot]"; fi |
| 23 | + if [ ${GITHUB_ACTIONS} ]; then git config --global user.email "github-actions[bot]@users.noreply.github.com"; fi |
| 24 | + if [ ${GITHUB_ACTIONS} ]; then git config --global credential.helper store; fi |
| 25 | + git clone --single-branch --branch gh-pages "https://x-access-token:${API_TOKEN_GITHUB}@github.com/bentoml/helm-charts.git" "${CLONE_DIR}" |
| 26 | + cp yatai-image-builder-crds-${VERSION}.tgz ${CLONE_DIR}/packages/ |
| 27 | + cd ${CLONE_DIR}; helm repo index . |
| 28 | + cd ${CLONE_DIR}; git add . && git commit --message "release yatai-image-builder-crds ${VERSION}" && git push -f origin HEAD:gh-pages || exit 1 |
| 29 | + rm -rf ${CLONE_DIR} || true |
| 30 | + |
| 31 | +release-devel: cleanup |
| 32 | + helm package . --version ${VERSION} --app-version ${VERSION} |
| 33 | + if [ ${GITHUB_ACTIONS} ]; then git config --global user.name "github-actions[bot]"; fi |
| 34 | + if [ ${GITHUB_ACTIONS} ]; then git config --global user.email "github-actions[bot]@users.noreply.github.com"; fi |
| 35 | + if [ ${GITHUB_ACTIONS} ]; then git config --global credential.helper store; fi |
| 36 | + git clone --single-branch --branch gh-pages "https://x-access-token:${API_TOKEN_GITHUB}@github.com/bentoml/helm-charts-devel.git" "${CLONE_DIR}" |
| 37 | + cp yatai-image-builder-crds-${VERSION}.tgz ${CLONE_DIR}/packages/ |
| 38 | + cd ${CLONE_DIR}; helm repo index . |
| 39 | + cd ${CLONE_DIR}; git add . && git commit --message "release yatai-image-builder-crds ${VERSION}" && git push -f origin HEAD:gh-pages || exit 1 |
| 40 | + rm -rf ${CLONE_DIR} || true |
| 41 | + |
| 42 | +template: |
| 43 | + helm template yatai-image-builder-crds ./ -n yatai-image-builder-crds --debug |
| 44 | + |
0 commit comments