Skip to content

Commit 7b44018

Browse files
committed
feat(justfile): add version format validation to release commands
- Add format validation for FFmpeg library release version - Add format validation for Go module release version - Fix capitalization of "FFmpeg" in command comment - Implement shell scripts with proper error handling - Add helpful error messages explaining the expected format The validation ensures versions follow the required patterns: - FFmpeg library: lib-X.Y.Z.N format (e.g., lib-8.0.1.0) - Go module: X.Y.Z.N format (e.g., 8.0.1.0)
1 parent 5935c77 commit 7b44018

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

justfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,14 @@ test:
4949
download-lib:
5050
go run ./cmd/download-lib/
5151

52-
# Trigger Ffmpeg library release
52+
# Trigger FFmpeg library release
5353
ffmpeg-release VERSION:
54+
#!/usr/bin/env bash
55+
set -euo pipefail
56+
if [[ ! "{{VERSION}}" =~ ^lib-[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
57+
echo "Error: VERSION must start with 'lib-' and match format lib-X.Y.Z.N (e.g., lib-8.0.1.0)"
58+
exit 1
59+
fi
5460
gh workflow run ffmpeg-release.yml -f version={{VERSION}}
5561

5662
# Check library release workflow status
@@ -59,6 +65,12 @@ ffmpeg-release-status:
5965

6066
# Trigger Go module release
6167
go-release VERSION:
68+
#!/usr/bin/env bash
69+
set -euo pipefail
70+
if [[ ! "{{VERSION}}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
71+
echo "Error: VERSION must be in format X.Y.Z.N (e.g., 8.0.1.0)"
72+
exit 1
73+
fi
6274
gh workflow run go-release.yml -f version={{VERSION}}
6375

6476
# Check Go module release workflow status

0 commit comments

Comments
 (0)