Skip to content

Commit a5cf60f

Browse files
committed
chore(gosu): change gosu to go build
1 parent 36bc517 commit a5cf60f

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

stacks/gosu/build.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,17 @@ function build() {
88
generate-stack-path
99
BIN_DIR="${DATA_DIR}"/bin
1010
mkdir -p "${BIN_DIR}"
11-
curl -fsSL -o "${BIN_DIR}"/"${STACK_NAME}" https://github.com/tianon/gosu/releases/download/"${STACK_VERSION}"/"${STACK_NAME}"-"${OS_ARCH}"
12-
chmod +x "${BIN_DIR}"/"${STACK_NAME}"
11+
install-stack go "${GO_VERSION}"
12+
. init-stack
13+
curl -fsSL -o tmp.tar.gz https://github.com/tianon/gosu/archive/refs/tags/${STACK_VERSION}.tar.gz
14+
tar -xvzf tmp.tar.gz
15+
cd gosu-${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 gosu-${STACK_VERSION} tmp.tar.gz
1322
}
1423

1524
# call build stack

0 commit comments

Comments
 (0)