File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -41,16 +41,15 @@ jobs:
4141 - name : ' Extract version from pom.xml'
4242 id : extract_version
4343 run : |
44- cd library-api
45- # Debug: show raw output
46- echo "Raw Maven output:"
47- devbox run -q -- mvn help:evaluate -Dexpression=project.version -q -DforceStdout 2>&1
48- echo "---"
44+ # Use -f to specify the pom.xml path (devbox runs from repo root)
45+ VERSION=$(devbox run -q -- mvn -f library-api/pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout 2>&1 | tail -1 | xargs)
4946
50- VERSION=$(devbox run -q -- mvn help:evaluate -Dexpression=project.version -q -DforceStdout 2>/dev/null | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -1 | tr -d '\n' | xargs)
47+ echo "Extracted VERSION: '${VERSION}'"
5148
52- if [ -z "$VERSION" ]; then
53- echo "ERROR: VERSION is empty!"
49+ # Validate it's a semantic version
50+ if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
51+ echo "ERROR: Invalid version format: '$VERSION'"
52+ echo "Expected semantic version (e.g., 0.1.2)"
5453 exit 1
5554 fi
5655
You can’t perform that action at this time.
0 commit comments