Skip to content

Commit

Permalink
fix: only add snapshot on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
DerTiedemann committed Jun 28, 2024
1 parent a6dd53d commit ed0a989
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bumpversion]
current_version = 2.23.0
current_version = 2.23.0
5 changes: 2 additions & 3 deletions .github/workflows/helm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ jobs:
- name: Get current version from bumpversion
id: get-version
run: |
version=$(cat .bumpversion.cfg | sed -nE 's/.*current_version = (.*)/\1/p')
if [[ "${GITHUB_REF#refs/heads/}" != "main" && "${GITHUB_REF#refs/heads/}" != "master" ]]; then
version=$(sed -nE 's/.*current_version = (.*)/\1/p' < .bumpversion.cfg)
if ! [[ "$GITHUB_REF" =~ ^refs/tags/.* ]]; then
version="${version}-SNAPSHOT"
fi
echo $version
echo "version=$version" >> $GITHUB_OUTPUT
shell: bash

Expand Down

0 comments on commit ed0a989

Please sign in to comment.