mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-03-20 23:41:18 +00:00
[ci] Fix escaping for gen_versions_map.sh script (#836)
Backport of #836
fixes errors like this:
```
make: Entering directory '/home/runner/work/cozystack/cozystack/packages/apps'
find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $2}' | while read i; do sed -i "s/^name: .*/name: $i/" "$i/Chart.yaml"; done
../../hack/gen_versions_map.sh
../../hack/gen_versions_map.sh: 34: [: !=: unexpected operator
fatal: Needed a single revision
make: *** [Makefile:17: gen-versions-map] Error 128
make: Leaving directory '/home/runner/work/cozystack/cozystack/packages/apps'
```
https://github.com/cozystack/cozystack/actions/runs/14591720553/job/40928276862?pr=835
Improved reliability of version generation by handling empty or
special values safely in the process.
(cherry picked from commit 7a9a1fcba4)
Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
This commit is contained in:
@@ -30,7 +30,7 @@ resolved_miss_map=$(
|
||||
fi
|
||||
|
||||
# if commit is not HEAD, check if it's valid
|
||||
if [ $commit != "HEAD" ]; then
|
||||
if [ "x$commit" != "xHEAD" ]; then
|
||||
if [ $(git show "${commit}:./${chart}/Chart.yaml" 2>/dev/null | awk '$1 == "version:" {print $2}') != "${version}" ]; then
|
||||
echo "Commit $commit for $chart $version is not valid" >&2
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user