Skip to content

Commit cb0ae03

Browse files
committed
chore(stacks): update tikv weed/
1 parent 9b06336 commit cb0ae03

3 files changed

Lines changed: 33 additions & 4 deletions

File tree

scripts/checker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,12 @@
265265
"owner": "tikv",
266266
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
267267
},
268+
"weed": {
269+
"name": "seaweedfs",
270+
"type": "github",
271+
"owner": "chrislusf",
272+
"match": "^[0-9]{1,}\.[0-9]{1,}$",
273+
},
268274
}
269275

270276

stacks/tikv/build.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,27 @@ function build() {
88
generate-stack-path
99
BIN_DIR="${DATA_DIR}"/bin
1010
mkdir -p "${BIN_DIR}"
11+
# tikv-server
1112
curl -fsSL -o tikv.tar.gz https://tiup-mirrors.pingcap.com/tikv-v${STACK_VERSION}-linux-${OS_ARCH}.tar.gz
1213
tar -xzf tikv.tar.gz
1314
mv tikv-server "${BIN_DIR}"
15+
16+
# pd-server
1417
curl -fsSL -o pd.tar.gz https://tiup-mirrors.pingcap.com/pd-v${STACK_VERSION}-linux-${OS_ARCH}.tar.gz
1518
tar -xzf pd.tar.gz
1619
mv pd-server "${BIN_DIR}"
17-
rm tikv.tar.gz pd.tar.gz
20+
21+
# tikv-ctl pd-ctl
22+
curl -fsSL -o ctl.tar.gz https://tiup-mirrors.pingcap.com/ctl-v${STACK_VERSION}-linux-${OS_ARCH}.tar.gz
23+
tar -xzf ctl.tar.gz
24+
mv tikv-ctl pd-ctl "${BIN_DIR}"
25+
26+
# pd-recover
27+
curl -fsSL -o pd-recover.tar.gz https://tiup-mirrors.pingcap.com/pd-recover-v${STACK_VERSION}-linux-${OS_ARCH}.tar.gz
28+
tar -xzf pd-recover.tar.gz
29+
mv pd-recover "${BIN_DIR}"
30+
31+
rm tikv.tar.gz pd.tar.gz ctl.tar.gz pd-recover.tar.gz binlogctl cdc ctl etcdctl tidb-ctl tidb-lightning-ctl -rf
1832
}
1933

2034
# call build stack

stacks/weed/build.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,23 @@ function build() {
88
generate-stack-path
99
install-stack go 1.18.3 && . init-stack
1010

11+
BIN_DIR="${DATA_DIR}"/bin
12+
mkdir -p "${BIN_DIR}"
13+
14+
# build weed
1115
curl -sSL "https://github.com/chrislusf/seaweedfs/archive/refs/tags/${STACK_VERSION}.tar.gz" | tar -xz \
1216
&& mv seaweedfs-${STACK_VERSION} $GOPATH/src/seaweedfs/ \
1317
&& cd $GOPATH/src/seaweedfs/weed \
1418
&& go install -tags "tikv"
15-
16-
BIN_DIR="${DATA_DIR}"/bin
17-
mkdir -p "${BIN_DIR}"
1819
mv $GOPATH/bin/weed "${BIN_DIR}"
20+
cd -
21+
22+
# seaweedfs-csi-driver
23+
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)
24+
curl -sSL "https://github.com/seaweedfs/seaweedfs-csi-driver/archive/refs/tags/v${WEED_CSI_VERSION}.tar.gz" | tar -xz \
25+
&& mv seaweedfs-csi-driver-${WEED_CSI_VERSION} $GOPATH/src/seaweedfs-csi-driver/ \
26+
&& cd $GOPATH/src/seaweedfs-csi-driver \
27+
&& go build -o "${BIN_DIR}"/weed-csi ./cmd/seaweedfs-csi-driver/main.go
1928
}
2029

2130
# call build stack

0 commit comments

Comments
 (0)