22pwd = $(shell pwd)
33version = $(shell poetry version -s)
44short_version = $(shell poetry version -s | cut -d'+' -d'-' -f1)
5+ helm_version = $(shell yq r helm/pipecheck/Chart.yaml 'version')
6+ helm_short_version = $(shell yq r helm/pipecheck/Chart.yaml 'version' | cut -d'+' -d'-' -f1)
57
68init :
79 curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
810
911check-bump :
12+ which yq || { echo " yq not installed!" ; exit 1; }
1013 which gh || { echo " gh (github cli) not installed!" ; exit 1; }
1114 [ " $( shell git rev-parse --abbrev-ref HEAD) " == " main" ] || { echo " bumping only possible on main branch" ; exit 1; }
1215
@@ -31,6 +34,21 @@ bump-patch: check-bump
3134 echo " __version__ = \" $( new_version) \" " > pipecheck/__init__.py
3235 git commit -a -m " bump patch-version from $( version) to $( new_version) "
3336
37+ helm-bump-major : check-bump
38+ $(eval helm_new_version = $(shell IFS=. read -r a b c<<<"$(helm_short_version ) ";echo "$$((a+1 ) ) .0.0") )
39+ sed -i ' s/version: .*/version: $(helm_new_version)/' helm/pipecheck/Chart.yaml
40+ git commit -a -m " bump helm minor-version from $( helm_version) to $( helm_new_version) "
41+
42+ helm-bump : check-bump
43+ $(eval helm_new_version = $(shell IFS=. read -r a b c<<<"$(helm_short_version ) ";echo "$$a.$$((b+1 ) ) .0") )
44+ sed -i ' s/version: .*/version: $(helm_new_version)/' helm/pipecheck/Chart.yaml
45+ git commit -a -m " bump helm minor-version from $( helm_version) to $( helm_new_version) "
46+
47+ helm-bump-patch : check-bump
48+ $(eval helm_new_version = $(shell IFS=. read -r a b c<<<"$(helm_short_version ) ";echo "$$a.$$b.$$((c+1 ) ) ") )
49+ sed -i ' s/version: .*/version: $(helm_new_version)/' helm/pipecheck/Chart.yaml
50+ git commit -a -m " bump helm minor-version from $( helm_version) to $( helm_new_version) "
51+
3452release :
3553 git push
3654 poetry version -s | xargs -i gh release create v{}
0 commit comments