Skip to content

Commit

Permalink
fix: sanitize the returned version - dont return string with slashes …
Browse files Browse the repository at this point in the history
…in (#366)

* fix: sanitize the returned version to not contain a slash when acting on a tag

* fix: sanitize the returned version to not contain a slash when acting on a tag or release
  • Loading branch information
fibble authored Oct 5, 2024
1 parent 47e31e4 commit 7d13277
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/actions/get-app-version/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ runs:
TAG=$(git describe --tags --exact-match $LATEST_APP_COMMIT 2>/dev/null) || true
if [[ -n $TAG ]]; then
echo "version=release/$TAG" >> $GITHUB_OUTPUT
SANITIZED_TAG=$(echo $TAG | sed 's/\//-/g')
echo "version=release-$SANITIZED_TAG" >> $GITHUB_OUTPUT
else
echo "version=$LATEST_APP_COMMIT" >> $GITHUB_OUTPUT
fi
else
echo "version=release/$LATEST_RELEASE" >> $GITHUB_OUTPUT
SANITIZED_LATEST_RELEASE=$(echo $LATEST_RELEASE | sed 's/\//-/g')
echo "version=release-$SANITIZED_LATEST_RELEASE" >> $GITHUB_OUTPUT
fi

0 comments on commit 7d13277

Please sign in to comment.