From a00829614255ea08f4743a0ad137f585c2dc4e65 Mon Sep 17 00:00:00 2001 From: Michael Riedmann Date: Thu, 14 Oct 2021 04:43:36 +0200 Subject: [PATCH] bump helm minor-version from 0.2.0 to 0.2.1 --- .github/workflows/release-chart.yaml | 1 + Makefile | 18 ++++++++++++++++++ cr.yaml | 1 + helm/pipecheck/Chart.yaml | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 cr.yaml diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index 572a4ac..36bfff6 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -28,5 +28,6 @@ jobs: uses: helm/chart-releaser-action@v1.2.1 with: charts_dir: helm + config: cr.yaml env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/Makefile b/Makefile index f3a0094..19196a2 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,14 @@ pwd = $(shell pwd) version = $(shell poetry version -s) short_version = $(shell poetry version -s | cut -d'+' -d'-' -f1) +helm_version = $(shell yq r helm/pipecheck/Chart.yaml 'version') +helm_short_version = $(shell yq r helm/pipecheck/Chart.yaml 'version' | cut -d'+' -d'-' -f1) init: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - check-bump: + which yq || { echo "yq not installed!"; exit 1; } which gh || { echo "gh (github cli) not installed!"; exit 1; } [ "$(shell git rev-parse --abbrev-ref HEAD)" == "main" ] || { echo "bumping only possible on main branch"; exit 1; } @@ -31,6 +34,21 @@ bump-patch: check-bump echo "__version__ = \"$(new_version)\"" > pipecheck/__init__.py git commit -a -m "bump patch-version from $(version) to $(new_version)" +helm-bump-major: check-bump + $(eval helm_new_version = $(shell IFS=. read -r a b c<<<"$(helm_short_version)";echo "$$((a+1)).0.0")) + sed -i 's/version: .*/version: $(helm_new_version)/' helm/pipecheck/Chart.yaml + git commit -a -m "bump helm minor-version from $(helm_version) to $(helm_new_version)" + +helm-bump: check-bump + $(eval helm_new_version = $(shell IFS=. read -r a b c<<<"$(helm_short_version)";echo "$$a.$$((b+1)).0")) + sed -i 's/version: .*/version: $(helm_new_version)/' helm/pipecheck/Chart.yaml + git commit -a -m "bump helm minor-version from $(helm_version) to $(helm_new_version)" + +helm-bump-patch: check-bump + $(eval helm_new_version = $(shell IFS=. read -r a b c<<<"$(helm_short_version)";echo "$$a.$$b.$$((c+1))")) + sed -i 's/version: .*/version: $(helm_new_version)/' helm/pipecheck/Chart.yaml + git commit -a -m "bump helm minor-version from $(helm_version) to $(helm_new_version)" + release: git push poetry version -s | xargs -i gh release create v{} diff --git a/cr.yaml b/cr.yaml new file mode 100644 index 0000000..78042b7 --- /dev/null +++ b/cr.yaml @@ -0,0 +1 @@ +release-name-template: "helm-{{ .Version }}" diff --git a/helm/pipecheck/Chart.yaml b/helm/pipecheck/Chart.yaml index cd4e0c5..1aaec9b 100644 --- a/helm/pipecheck/Chart.yaml +++ b/helm/pipecheck/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.0 +version: 0.2.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to