Skip to content

Commit

Permalink
Merge pull request #1321 from merico-dev/feat-kehao-check-s3plugin-num
Browse files Browse the repository at this point in the history
feat: check if the number of plugins on s3 is correct
  • Loading branch information
daniel-hutao authored Dec 9, 2022
2 parents e831f25 + 2b11064 commit 13a1cf8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions hack/release/auto-release-darwin-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,17 @@ echo "${DTM_CORE_BINARY} uploaded."
# After downloading aws cli, you need to configure aws credentials.
pip3 install awscli
aws s3 cp $plugin_dir $STORAGE_URL_WITH_TAG --recursive --acl public-read

# check if the number of plugins on s3 is correct
local_plugin_nums=$(../../dtm list plugins |wc -l)
((local_plugin_file_nums=local_plugin_nums*6))
s3_plugin_file_total_nums=$(aws s3 ls download.devstream.io/"$tag"/|awk '{print $NF}'|uniq|wc -l)
((s3_plugin_file_nums=s3_plugin_file_total_nums-3))
echo "s3_plugin_file_nums:" "$s3_plugin_file_nums"
echo "local_plugin_file_nums:" "$local_plugin_file_nums"
if [ "$local_plugin_file_nums" -ne "$s3_plugin_file_nums" ]
then
echo "Attention,Maybe the plugin uploaded to s3 is not correct."
else
echo "The plugin uploaded to s3 is correct."
fi

0 comments on commit 13a1cf8

Please sign in to comment.