Skip to content

Commit d8f3547

Browse files
committed
[ci] Fix escaping for gen_versions_map.sh script
Signed-off-by: Andrei Kvapil <[email protected]>
1 parent b9112a3 commit d8f3547

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎hack/gen_versions_map.sh‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ search_commits=$(git ls-remote --tags origin | awk -F/ '$3 ~ /v[0-9]+.[0-9]+.[0-
2424
resolved_miss_map=$(
2525
echo "$miss_map" | while read -r chart version commit; do
2626
# if version is found in HEAD, it's HEAD
27-
if [ $(awk '$1 == "version:" {print $2}' ./${chart}/Chart.yaml) = "${version}" ]; then
27+
if [ "$(awk '$1 == "version:" {print $2}' ./${chart}/Chart.yaml)" = "${version}" ]; then
2828
echo "$chart $version HEAD"
2929
continue
3030
fi
3131
3232
# if commit is not HEAD, check if it's valid
33-
if [ "x$commit" != "xHEAD" ]; then
34-
if [ $(git show "${commit}:./${chart}/Chart.yaml" 2>/dev/null | awk '$1 == "version:" {print $2}') != "${version}" ]; then
33+
if [ "$commit" != "HEAD" ]; then
34+
if [ "$(git show "${commit}:./${chart}/Chart.yaml" 2>/dev/null | awk '$1 == "version:" {print $2}')" != "${version}" ]; then
3535
echo "Commit $commit for $chart $version is not valid" >&2
3636
exit 1
3737
fi
@@ -44,7 +44,7 @@ resolved_miss_map=$(
4444
# if commit is HEAD, but version is not found in HEAD, check all tags
4545
found_tag=""
4646
for tag in $search_commits; do
47-
if [ $(git show "${tag}:./${chart}/Chart.yaml" 2>/dev/null | awk '$1 == "version:" {print $2}') = "${version}" ]; then
47+
if [ "$(git show "${tag}:./${chart}/Chart.yaml" 2>/dev/null | awk '$1 == "version:" {print $2}')" = "${version}" ]; then
4848
found_tag=$(git rev-parse --short "${tag}")
4949
break
5050
fi

0 commit comments

Comments
 (0)