File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 LATEST_TAG=$(curl -s https://api.github.com/repos/LinearTapeFileSystem/ltfs/tags | jq -r '.[0].name')
2626 echo "Latest tag from upstream: $LATEST_TAG"
2727
28- # Extract version numbers (e.g., v.2.4.8.2-10520 -> 2.4.8.2)
29- VERSION=$(echo "$LATEST_TAG" | sed -E 's/^v\.?([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+).*/\1/')
28+ # Extract version numbers and build number (e.g., v.2.4.8.2-10520 -> 2.4.8.2 (10520))
29+ VERSION_NUM=$(echo "$LATEST_TAG" | sed -E 's/^v\.?([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+).*/\1/')
30+ BUILD_NUM=$(echo "$LATEST_TAG" | sed -E 's/^v\.?[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+-([0-9]+).*/\1/')
31+
32+ # Combine version with build number
33+ if [ -n "$BUILD_NUM" ] && [ "$BUILD_NUM" != "$LATEST_TAG" ]; then
34+ VERSION="$VERSION_NUM ($BUILD_NUM)"
35+ else
36+ VERSION="$VERSION_NUM"
37+ fi
38+
3039 echo "Extracted version: $VERSION"
3140
3241 # Store in output
You can’t perform that action at this time.
0 commit comments