fix(ci): keep version suffix/build in tags and fix Node.js cache
- Keep full version format (0.0.1-m3 or 1.2.3+456) instead of stripping suffix - Tags now include full version: krow-withus-worker-mobile/dev-v0.0.1-m3 - Remove invalid Node.js cache path that was causing resolution errors
This commit is contained in:
10
.github/scripts/extract-version.sh
vendored
10
.github/scripts/extract-version.sh
vendored
@@ -34,13 +34,13 @@ if [ -z "$VERSION_LINE" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract just the semantic version (before the + or -)
|
||||
VERSION=$(echo "$VERSION_LINE" | sed 's/version: *//' | sed 's/[+\-].*//' | tr -d ' ')
|
||||
# Extract full version including suffix/build number
|
||||
VERSION=$(echo "$VERSION_LINE" | sed 's/version: *//' | tr -d ' ')
|
||||
|
||||
# Validate version format
|
||||
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
# Validate version format (X.Y.Z with optional +build or -suffix)
|
||||
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-+][a-zA-Z0-9]+)?$ ]]; then
|
||||
echo "❌ Error: Invalid version format in pubspec.yaml: $VERSION" >&2
|
||||
echo "Expected format: X.Y.Z (e.g., 0.1.0)" >&2
|
||||
echo "Expected format: X.Y.Z, X.Y.Z+build, or X.Y.Z-suffix (e.g., 0.1.0, 0.1.0+12, 0.1.0-m3)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user