File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66# Implement build function
77function build() {
88 generate-stack-path
9- if [[ " ${OS_ARCH} " == " amd64" ]]; then
10- pack_download_url=" https://github.com/buildpacks/pack/releases/download/v${STACK_VERSION} /pack-v${STACK_VERSION} -linux.tgz"
11- else
12- pack_download_url=" https://github.com/buildpacks/pack/releases/download/v${STACK_VERSION} /pack-v${STACK_VERSION} -linux-${OS_ARCH} .tgz"
13- fi
149 BIN_DIR=" ${DATA_DIR} " /bin
1510 mkdir -p " ${BIN_DIR} "
16- curl -sSL " ${pack_download_url} " | tar xvz -C " ${BIN_DIR} "
11+ install-stack go " ${GO_VERSION} "
12+ . init-stack
13+ curl -fsSL -o tmp.tar.gz https://github.com/buildpacks/pack/archive/refs/tags/v${STACK_VERSION} .tar.gz
14+ tar -xvzf tmp.tar.gz
15+ cd pack-${STACK_VERSION}
16+ # fix CVE-2022-28948
17+ go get -u ./...; go mod tidy; go mod vendor
18+
19+ go build -o " ${BIN_DIR} " /" ${STACK_NAME} "
20+ cd ..
21+ rm -rf pack-${STACK_VERSION} tmp.tar.gz
1722}
1823
1924# call build stack
You can’t perform that action at this time.
0 commit comments