Skip to content

Commit 7200e9f

Browse files
committed
chore(go): bump go 1.22
1 parent 185598f commit 7200e9f

7 files changed

Lines changed: 20 additions & 14 deletions

File tree

scripts/stack-utils

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ shopt -s expand_aliases
55
alias gzip="gzip -n -9"
66

77
. /etc/os-release
8-
export GO_VERSION=1.20
9-
export RUBY_VERSION=3.2
8+
export GO_VERSION=1.22
9+
export RUBY_VERSION=3.3
1010
export STACK_NAME="${STACK_NAME:?name is required}"
1111
export STACK_VERSION="${STACK_VERSION:?version is required}"
1212
export OS_NAME="${OS_NAME:-linux}"

stacks/envtpl/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
function build() {
88
generate-stack-path
99
install-stack go "${GO_VERSION}" && . init-stack
10+
mkdir -p $GOPATH/src
1011

1112
curl -sSL "https://github.com/subfuzion/envtpl/archive/refs/tags/v${STACK_VERSION}.tar.gz" | tar -xz \
1213
&& mv envtpl-${STACK_VERSION} $GOPATH/src/envtpl/ \

stacks/fluent-bit/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ function build() {
1010
gcc liblzo2-dev make cmake git build-essential
1111
install-stack go "${GO_VERSION}"
1212
. /opt/drycc/go/profile.d/*.sh
13+
mkdir -p $GOPATH/src
1314

1415
git clone -b v$STACK_VERSION --depth 1 https://github.com/fluent/fluent-bit $GOPATH/src/fluent-bit \
1516
&& cd $GOPATH/src/fluent-bit/build \

stacks/podman/build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ EOF
3737
go-md2man \
3838
libapparmor-dev
3939

40-
install-stack go "${GO_VERSION}"
41-
export GOPATH=/opt/drycc/go
42-
export PATH=$GOPATH/bin:$PATH
40+
install-stack go "${GO_VERSION}" && . init-stack
4341

4442
curl -fsSL -o tmp.tar.gz https://github.com/containers/podman/archive/refs/tags/v${STACK_VERSION}.tar.gz
4543
tar -xzf tmp.tar.gz && rm tmp.tar.gz

stacks/seaweedfs/build.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function build() {
1111
BIN_DIR="${DATA_DIR}"/bin
1212
mkdir -p "${BIN_DIR}"
1313

14+
mkdir -p $GOPATH/src
1415
# build weed
1516
curl -sSL "https://github.com/seaweedfs/seaweedfs/archive/refs/tags/${STACK_VERSION}.tar.gz" | tar -xz \
1617
&& mv seaweedfs-${STACK_VERSION} $GOPATH/src/seaweedfs/ \
@@ -21,16 +22,17 @@ function build() {
2122

2223

2324
# seaweedfs-csi-driver
24-
WEED_CSI_VERSION=$(curl -Ls https://github.com/seaweedfs/seaweedfs-csi-driver/releases|grep /seaweedfs/seaweedfs-csi-driver/releases/tag/ | sed -E 's/.*\/seaweedfs\/seaweedfs-csi-driver\/releases\/tag\/v([0-9\.]{1,}(-rc.[0-9]{1,})?)".*/\1/g' | head -1)
25-
if [[ "$WEED_CSI_VERSION" == "master" ]]; then
26-
WEED_CSI_URL="https://github.com/seaweedfs/seaweedfs-csi-driver/archive/refs/heads/${WEED_CSI_VERSION}.tar.gz"
27-
else
28-
WEED_CSI_URL="https://github.com/seaweedfs/seaweedfs-csi-driver/archive/refs/tags/v${WEED_CSI_VERSION}.tar.gz"
29-
fi
30-
curl -sSL "${WEED_CSI_URL}" | tar -xz \
31-
&& mv seaweedfs-csi-driver-${WEED_CSI_VERSION} $GOPATH/src/seaweedfs-csi-driver/ \
25+
WEED_CSI_GIT_URL=https://github.com/seaweedfs/seaweedfs-csi-driver
26+
WEED_CSI_VERSION=$(curl -Ls $WEED_CSI_GIT_URL/releases|grep /seaweedfs/seaweedfs-csi-driver/releases/tag/ | sed -E 's/.*\/seaweedfs\/seaweedfs-csi-driver\/releases\/tag\/v([0-9\.]{1,}(-rc.[0-9]{1,})?)".*/\1/g' | head -1)
27+
git clone --depth 1 -b v$WEED_CSI_VERSION $WEED_CSI_GIT_URL $GOPATH/src/seaweedfs-csi-driver \
3228
&& cd $GOPATH/src/seaweedfs-csi-driver \
33-
&& go build -o "${BIN_DIR}"/weed-csi ./cmd/seaweedfs-csi-driver/main.go
29+
&& LDFLAGS="-s -w -X github.com/seaweedfs/seaweedfs-csi-driver/pkg/driver.gitCommit=$(git rev-parse --short HEAD)" \
30+
&& LDFLAGS="$LDFLAGS -X github.com/seaweedfs/seaweedfs-csi-driver/pkg/driver.driverVersion=${WEED_CSI_VERSION}" \
31+
&& LDFLAGS="$LDFLAGS -X github.com/seaweedfs/seaweedfs-csi-driver/pkg/driver.buildDate=$(date --iso-8601=seconds)" \
32+
&& export LDFLAGS \
33+
&& go mod tidy \
34+
&& make build \
35+
&& cp _output/seaweedfs-csi-driver "${BIN_DIR}"/weed-csi
3436

3537
# upx
3638
upx --lzma --best "${BIN_DIR}"/*

stacks/vouch-proxy/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ function build() {
88
generate-stack-path
99
install-stack go "${GO_VERSION}" && . init-stack
1010

11+
mkdir -p $GOPATH/src
12+
1113
curl -sSL "https://github.com/vouch/vouch-proxy/archive/refs/tags/v${STACK_VERSION}.tar.gz" | tar -xz \
1214
&& mv vouch-proxy-${STACK_VERSION} $GOPATH/src/vouch-proxy/ \
1315
&& cd $GOPATH/src/vouch-proxy \

stacks/wal-g/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ function build() {
1111
install-stack go "${GO_VERSION}"
1212
. /opt/drycc/go/profile.d/*.sh
1313

14+
mkdir -p $GOPATH/src
15+
1416
git clone https://github.com/wal-g/wal-g/ $GOPATH/src/wal-g \
1517
&& cd $GOPATH/src/wal-g/ \
1618
&& git checkout v$STACK_VERSION \

0 commit comments

Comments
 (0)