Publish Factorio deployment as a Helm chart
Validate, publish and promote Factorio chart / chart (push) Failing after 10s
Validate, publish and promote Factorio chart / chart (push) Failing after 10s
This commit is contained in:
1 parent
a165094c8e
commit
bf806c886c
19 files changed
+397
-252
No files matched your search
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
description=$(git describe --tags --long --match 'v[0-9]*' --dirty)
|
||||
case "$description" in
|
||||
*-dirty) echo 'Refusing to package a dirty tree' >&2; exit 1 ;;
|
||||
esac
|
||||
version=${description#v}
|
||||
base=${version%%-[0-9]*}
|
||||
app_version=$(sed -n 's/^appVersion:[[:space:]]*//p' Chart.yaml | tr -d '"')
|
||||
test -n "$app_version" || { echo 'Chart.yaml appVersion is missing' >&2; exit 1; }
|
||||
test "$base" = "$app_version" || {
|
||||
echo "Git release $base does not match Chart.yaml appVersion $app_version" >&2
|
||||
exit 1
|
||||
}
|
||||
case "$version" in
|
||||
*-0-g*) version=${version%%-0-g*} ;;
|
||||
esac
|
||||
printf '%s\n' "$version"
|
||||
Reference in new issue
Block a user