Skip to content

Commit 13a1cf8

Browse files
authored
Merge pull request #1321 from merico-dev/feat-kehao-check-s3plugin-num
feat: check if the number of plugins on s3 is correct
2 parents e831f25 + 2b11064 commit 13a1cf8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

hack/release/auto-release-darwin-arm64.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,17 @@ echo "${DTM_CORE_BINARY} uploaded."
7171
# After downloading aws cli, you need to configure aws credentials.
7272
pip3 install awscli
7373
aws s3 cp $plugin_dir $STORAGE_URL_WITH_TAG --recursive --acl public-read
74+
75+
# check if the number of plugins on s3 is correct
76+
local_plugin_nums=$(../../dtm list plugins |wc -l)
77+
((local_plugin_file_nums=local_plugin_nums*6))
78+
s3_plugin_file_total_nums=$(aws s3 ls download.devstream.io/"$tag"/|awk '{print $NF}'|uniq|wc -l)
79+
((s3_plugin_file_nums=s3_plugin_file_total_nums-3))
80+
echo "s3_plugin_file_nums:" "$s3_plugin_file_nums"
81+
echo "local_plugin_file_nums:" "$local_plugin_file_nums"
82+
if [ "$local_plugin_file_nums" -ne "$s3_plugin_file_nums" ]
83+
then
84+
echo "Attention,Maybe the plugin uploaded to s3 is not correct."
85+
else
86+
echo "The plugin uploaded to s3 is correct."
87+
fi

0 commit comments

Comments
 (0)