Skip to content

Commit bd9bc6f

Browse files
committed
chore(builder): add --ignore-existing bucket
1 parent 303b791 commit bd9bc6f

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

rootfs/bin/create_bucket

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,5 @@ mc config host add storage \
88
"${DRYCC_STORAGE_SECRETKEY}" \
99
--lookup "${DRYCC_STORAGE_LOOKUP}" \
1010
--api s3v4
11-
12-
has_bucket(){
13-
mc ls storage -json|jq -r '.key'|grep -w "${DRYCC_STORAGE_BUCKET}"
14-
}
15-
1611
mc ping storage -x
17-
18-
if [ -z "$(has_bucket)" ] ;then
19-
mc mb storage/"${DRYCC_STORAGE_BUCKET}"
20-
if [ -z "$(has_bucket)" ] ;then
21-
echo "create bucket ${DRYCC_STORAGE_BUCKET} error"
22-
exit 1
23-
fi
24-
fi
25-
echo "create bucket ${DRYCC_STORAGE_BUCKET} success"
12+
mc mb --ignore-existing storage/"${DRYCC_STORAGE_BUCKET}"

0 commit comments

Comments
 (0)