Skip to content

Commit 1f34b01

Browse files
thxCodeshanewxy
authored andcommitted
ci: adjust walrus cli validate script
Signed-off-by: thxCode <thxcode0824@gmail.com>
1 parent 0cb4de4 commit 1f34b01

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

hack/lib/walrus-cli.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function seal::walrus_cli::install() {
1717
curl --retry 3 --retry-all-errors --retry-delay 3 \
1818
-o "${ROOT_DIR}/.sbin/walrus-cli" \
1919
-sSfL "https://walrus-cli-1303613262.cos.ap-guangzhou.myqcloud.com/releases/latest/walrus-cli-${os}-${arch}"
20-
20+
2121
chmod a+x "${ROOT_DIR}/.sbin/walrus-cli"
2222
}
2323

@@ -26,18 +26,17 @@ function seal::walrus_cli::validate() {
2626
os=$(seal::util::get_os)
2727
local arch
2828
arch=$(seal::util::get_arch)
29-
29+
3030
# shellcheck disable=SC2046
3131
if [[ -n "$(command -v $(seal::walrus_cli::bin))" ]]; then
3232
if [[ "${walrus_cli_version}" == "latest" ]]; then
3333
local expected_md5sum
34-
expected_md5sum=$(curl --retry 3 --retry-all-errors --retry-delay 3 -IsSfL "https://walrus-cli-1303613262.cos.ap-guangzhou.myqcloud.com/releases/latest/walrus-cli-${os}-${arch}" | grep ETag | cut -d " " -f 2 | sed -e 's/"//g')
34+
expected_md5sum="$(curl --retry 3 --retry-all-errors --retry-delay 3 -IsSfL "https://walrus-cli-1303613262.cos.ap-guangzhou.myqcloud.com/releases/latest/walrus-cli-${os}-${arch}" | grep ETag | cut -d" " -f 2 | sed -e 's/"//g' | sed -e 's/\r//g')"
3535
local actual_md5sum
36-
actual_md5sum=$(md5sum "$(seal::walrus_cli::bin)" | cut -d " " -f 1)
36+
actual_md5sum="$(md5sum $(which $(seal::walrus_cli::bin)) | cut -d" " -f 1)"
3737
if [[ "${expected_md5sum}" == "${actual_md5sum}" ]]; then
3838
return 0
3939
fi
40-
return 0
4140
elif [[ $($(seal::walrus_cli::bin) --version 2>/dev/null | head -n 1 | cut -d " " -f 3 2>&1) == "${walrus_cli_version}" ]]; then
4241
return 0
4342
fi

schema.yaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,6 @@ components:
66
variables:
77
type: object
88
properties:
9-
context:
10-
title: Context
11-
type: object
12-
description: |
13-
Receive contextual information. When Walrus deploys, Walrus will inject specific contextual information into this field.
14-
default: {}
15-
nullable: true
16-
additionalProperties:
17-
type: object
18-
x-walrus-ui:
19-
colSpan: 12
20-
x-walrus-ui:
21-
colSpan: 12
22-
group: Advanced
23-
hidden: true
24-
order: 1
259
infrastructure:
2610
title: Infrastructure
2711
type: object

0 commit comments

Comments
 (0)