Skip to content

Commit

Permalink
bump helm minor-version from 0.2.0 to 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mriedmann committed Oct 14, 2021
1 parent 9ed975c commit a008296
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/release-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ jobs:
uses: helm/[email protected]
with:
charts_dir: helm
config: cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand All @@ -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{}
Expand Down
1 change: 1 addition & 0 deletions cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release-name-template: "helm-{{ .Version }}"
2 changes: 1 addition & 1 deletion helm/pipecheck/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a008296

Please sign in to comment.