Skip to content

Commit 49d5357

Browse files
committed
ci: adjust walrus cli validate script
Signed-off-by: thxCode <[email protected]>
1 parent 79e4fb5 commit 49d5357

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

hack/lib/walrus-cli.sh

+3-4
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

@@ -31,13 +31,12 @@ function seal::walrus_cli::validate() {
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

-16
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,6 @@ components:
88
required:
99
- infrastructure
1010
properties:
11-
context:
12-
title: Context
13-
type: object
14-
description: |
15-
Receive contextual information. When Walrus deploys, Walrus will inject specific contextual information into this field.
16-
default: {}
17-
nullable: true
18-
additionalProperties:
19-
type: object
20-
x-walrus-ui:
21-
colSpan: 12
22-
x-walrus-ui:
23-
colSpan: 12
24-
group: Basic
25-
hidden: true
26-
order: 1
2711
infrastructure:
2812
title: Infrastructure
2913
type: object

0 commit comments

Comments
 (0)