Skip to content

Commit

Permalink
ci(gha): dev versioning to use commits since tag (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuxencs authored Mar 7, 2025
1 parent 1da54d1 commit 7526d44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ jobs:
VERSION="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}"
if [[ "${{ github.ref }}" == "refs/heads/develop" ]]; then
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
SHORT_SHA=$(git rev-parse --short HEAD)
VERSION="${LATEST_TAG}-develop-${SHORT_SHA}"
COMMITS_SINCE_TAG=$(git rev-list ${LATEST_TAG}..HEAD --count)
VERSION="${LATEST_TAG}-dev${COMMITS_SINCE_TAG}"
fi
echo "Version: ${VERSION}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 7526d44

Please sign in to comment.