Skip to content

Commit 8e51575

Browse files
committed
Fix our use of yq
Tool: gitpod/catfood.gitpod.cloud
1 parent 0ad88ab commit 8e51575

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.github/workflows/dockerhub-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
env:
9292
SKOPEO_AUTH_DIR: ${{env.SKOPEO_AUTH_DIR}}
9393
run: |
94-
IMAGES=$(cat .github/promote-images.yml | yq '."europe-docker.pkg.dev/gitpod-artifacts/docker-dev"."images-by-tag-regex"|keys[]' -r)
94+
IMAGES=$(cat .github/promote-images.yml | yq '."europe-docker.pkg.dev/gitpod-artifacts/docker-dev"."images-by-tag-regex"|keys[]')
9595
for IMAGE in $IMAGES;
9696
do
9797
sudo -E skopeo copy --format=oci --dest-oci-accept-uncompressed-layers --retry-times=5 \

.github/workflows/push-main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ jobs:
168168
run: |
169169
set -euo pipefail
170170
171-
IFS=$'\n' read -r -d '' -a IMAGE_TAGS_ARR < <(yq -r '.sync.images."workspace-base-images"[]' ./.github/sync-containers.yml && printf '\0')
171+
IFS=$'\n' read -r -d '' -a IMAGE_TAGS_ARR < <(yq '.sync.images."workspace-base-images"[]' ./.github/sync-containers.yml && printf '\0')
172172
UPLOADS_STRING=""
173173
for IMAGE_TAG in "${IMAGE_TAGS_ARR[@]}"; do
174174
UPLOADS_STRING+=$(printf "./.github/workflows/push-main/upload_image.sh %s%s" ${IMAGE_TAG}'\n')

build-chunk.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function extract_variants() {
3030
if [[ ! -f "chunks/${chunk_name}/chunk.yaml" ]]; then
3131
variants+=("${chunk_name}")
3232
else
33-
for variant in $(yq '.variants[].name' -r <"chunks/${chunk_name}/chunk.yaml"); do
33+
for variant in $(yq '.variants[].name' "chunks/${chunk_name}/chunk.yaml"); do
3434
variants+=("${chunk_name}:${variant}")
3535
done
3636
fi

build-combo.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function build_combination() {
99
combination=$1
1010

1111
local exists
12-
exists="$(yq e '.combiner.combinations[] | select (.name=="'"$combination"'")' dazzle.yaml)"
12+
exists="$(yq '.combiner.combinations[] | select (.name=="'"$combination"'")' dazzle.yaml)"
1313
if [[ -z "$exists" ]]; then
1414
echo "combination is not defined"
1515
exit 1
@@ -30,7 +30,7 @@ function get_refs() {
3030
local ref=$1
3131
echo "$ref"
3232

33-
refs="$(yq e '.combiner.combinations[] | select (.name=="'"$ref"'") | .ref[]' dazzle.yaml)"
33+
refs="$(yq '.combiner.combinations[] | select (.name=="'"$ref"'") | .ref[]' dazzle.yaml)"
3434
if [[ -z "$refs" ]]; then
3535
return
3636
fi
@@ -43,7 +43,7 @@ function get_refs() {
4343
function get_chunks() {
4444
# shellcheck disable=SC2068
4545
for ref in $@; do
46-
chunks=$(yq e '.combiner.combinations[] | select (.name=="'"$ref"'") | .chunks[]' dazzle.yaml)
46+
chunks=$(yq '.combiner.combinations[] | select (.name=="'"$ref"'") | .chunks[]' dazzle.yaml)
4747
echo "$chunks"
4848
done
4949
}

build-common.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function get_available_chunks() {
3030
for chunk in $chunk_defs; do
3131
local chunkYaml="chunks/${chunk}/chunk.yaml"
3232
if [[ -f "$chunkYaml" ]]; then
33-
variants=$(yq e '.variants[].name' "$chunkYaml")
33+
variants=$(yq '.variants[].name' "$chunkYaml")
3434
for variant in $variants; do
3535
echo "$chunk:$variant"
3636
done

0 commit comments

Comments
 (0)