feat: catalogue-publish action
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0caf882af0
commit
74e7fc4194
6 files changed
+324
No files matched your search
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# Derive a version code from strict semver MAJOR.MINOR.PATCH (each 0-999):
|
||||
# MAJOR*1000000 + MINOR*1000 + PATCH. Anything else exits 1.
|
||||
set -eu
|
||||
v="${1:-}"
|
||||
if [[ "$v" =~ ^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$ ]]; then
|
||||
echo $(( 10#${BASH_REMATCH[1]} * 1000000 + 10#${BASH_REMATCH[2]} * 1000 + 10#${BASH_REMATCH[3]} ))
|
||||
else
|
||||
echo "error: version '$v' is not MAJOR.MINOR.PATCH with components < 1000; pass version-code explicitly" >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user