File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,11 +9,14 @@ function build() {
99 install-stack go " ${GO_VERSION} " && . init-stack
1010 mkdir -p $GOPATH /src
1111
12- curl -sSL " https://github.com/duanhongyi /envtpl/archive/refs/tags/v${STACK_VERSION} .tar.gz" | tar -xz \
12+ curl -sSL " https://github.com/subfuzion /envtpl/archive/refs/tags/v${STACK_VERSION} .tar.gz" | tar -xz \
1313 && mv envtpl-${STACK_VERSION} $GOPATH /src/envtpl/ \
14- && cd $GOPATH /src/envtpl \
15- && export GO111MODULE=on \
16- && CGO_ENABLED=0 go build \
14+ && cd $GOPATH /src/envtpl
15+ # fix CVE-2022-28948
16+ go get -u ./...; go mod tidy; go mod vendor
17+
18+ export GO111MODULE=on
19+ CGO_ENABLED=0 go build \
1720 -ldflags " -X main.AppVersionMetadata=$( date -u +%s) " \
1821 -a -installsuffix cgo -o /bin/envtpl ./cmd/envtpl/.
1922
Original file line number Diff line number Diff line change @@ -8,10 +8,17 @@ function build() {
88 generate-stack-path
99 BIN_DIR=" ${DATA_DIR} " /bin
1010 mkdir -p " ${BIN_DIR} "
11- architecture=$( dpkg --print-architecture)
12- curl -o " ${BIN_DIR} " /yj \
13- -L " https://github.com/sclevine/yj/releases/download/v${STACK_VERSION} /yj-linux-$architecture " ; \
14- chmod +x " ${BIN_DIR} " /yj
11+ install-stack go " ${GO_VERSION} "
12+ . init-stack
13+ curl -fsSL -o tmp.tar.gz https://github.com/sclevine/yj/archive/refs/tags/v${STACK_VERSION} .tar.gz
14+ tar -xvzf tmp.tar.gz
15+ cd yj-${STACK_VERSION}
16+ # fix CVE-2022-28948
17+ go get -u ./...; go mod tidy; go mod vendor
18+
19+ go build -ldflags " -X main.Version=${STACK_VERSION} " -o " ${BIN_DIR} " /yj
20+ cd ..
21+ rm -rf yj-${STACK_VERSION} tmp.tar.gz
1522}
1623
1724# call build stack
You can’t perform that action at this time.
0 commit comments