We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e30141 commit 36bc517Copy full SHA for 36bc517
1 file changed
stacks/yq/build.sh
@@ -8,10 +8,17 @@ function build() {
8
generate-stack-path
9
BIN_DIR="${DATA_DIR}"/bin
10
mkdir -p "${BIN_DIR}"
11
- architecture=$(dpkg --print-architecture)
12
- curl -o "${BIN_DIR}"/yq \
13
- -L "https://github.com/mikefarah/yq/releases/download/v${STACK_VERSION}/yq_linux_$architecture"; \
14
- chmod +x "${BIN_DIR}"/yq
+ install-stack go "${GO_VERSION}"
+ . init-stack
+ curl -fsSL -o tmp.tar.gz https://github.com/mikefarah/yq/archive/refs/tags/v${STACK_VERSION}.tar.gz
+ tar -xvzf tmp.tar.gz
15
+ cd yq-${STACK_VERSION}
16
+ # fix CVE-2022-28948
17
+ go get -u ./...; go mod tidy; go mod vendor
18
+
19
+ go build -o "${BIN_DIR}"/yq
20
+ cd ..
21
+ rm -rf yq-${STACK_VERSION} tmp.tar.gz
22
}
23
24
# call build stack
0 commit comments