Skip to content

Commit 8efb8dc

Browse files
committed
library-api: troubleshoot deployment
1 parent aae057d commit 8efb8dc

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/deploy-library-api.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)