Skip to content

Commit

Permalink
yqコマンドに-oyオプション付与 (#3719)
Browse files Browse the repository at this point in the history
* yqでJSON形式を扱う際に-ojオプション付与

* -oyオプションに変更
  • Loading branch information
massongit authored Oct 29, 2023
1 parent 9a637a5 commit 3b661a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion elm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN apt-get update \
WORKDIR /

COPY frontend/elm.json ./
RUN elm_version="$(yq -r '."elm-version"' elm.json)" \
RUN elm_version="$(yq -oy '."elm-version"' elm.json)" \
&& git clone -b "${elm_version}" https://github.com/elm/compiler.git

WORKDIR /compiler
Expand Down
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COPY frontend/elm.json ./
RUN if [ "${TARGETPLATFORM}" != "linux/arm64" ]; then \
curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq; \
chmod +x /usr/bin/yq; \
elm_version="$(yq -r '."elm-version"' elm.json)"; \
elm_version="$(yq -oy '."elm-version"' elm.json)"; \
curl -L -o elm.gz "https://github.com/elm/compiler/releases/download/${elm_version}/binary-for-linux-64-bit.gz"; \
gunzip elm.gz; \
chmod +x elm; \
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/build_frontend/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# https://github.com/elm/compiler/blob/24d3a89469e75cf7aa579442ecaf5ddfdd192ab2/installers/linux/README.md
elm_version="$(yq -r '."elm-version"' elm.json)"
elm_version="$(yq -oy '."elm-version"' elm.json)"
curl -L -o elm.gz "https://github.com/elm/compiler/releases/download/${elm_version}/binary-for-linux-64-bit.gz"
gunzip elm.gz
chmod +x elm
Expand Down

0 comments on commit 3b661a9

Please sign in to comment.