Skip to content

Commit

Permalink
Update build_and_release_all.yml
Browse files Browse the repository at this point in the history
Modify the Read Version from VERSION File step to sanitize the branch name when it's used for versions
  • Loading branch information
mikecarr authored Jan 30, 2025
1 parent e5a4001 commit e2e315c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build_and_release_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ jobs:
VERSION=${GITHUB_REF#refs/tags/}
VERSION=${VERSION#release-v} # Remove "release-v" prefix
else
VERSION=$(git rev-parse --short HEAD) # Use short commit hash for branch builds
# Use sanitized branch name or short commit hash for branch builds
BRANCH_NAME=${{ github.ref_name }}
SANITIZED_BRANCH=$(echo "$BRANCH_NAME" | tr '/' '-' | tr -d '[:space:]') # Replace slashes with dashes
VERSION="$SANITIZED_BRANCH-$(git rev-parse --short HEAD)" # Combine sanitized branch name with commit hash
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "v$VERSION" > OpenIPC_Config/VERSION
Expand Down

0 comments on commit e2e315c

Please sign in to comment.