Skip to content

Commit

Permalink
feat: auto-release-darwin-arm64.sh improvement
Browse files Browse the repository at this point in the history
* feat: auto-release-darwin-arm64.sh improvement

* chore: some minor improvement with auto-release-darwin-arm64.sh

Signed-off-by: Daniel Hu <tao.hu@merico.dev>

Co-authored-by: yclchuxue <yclchuxue@gmail.com>
Co-authored-by: Daniel Hu <tao.hu@merico.dev>
  • Loading branch information
3 people authored May 19, 2022
1 parent 56bdb19 commit ff6aa82
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
#! /bin/bash -e
# usage: `sh auto-release-darwin-arm64.sh -t v0.6.0`
set -o nounset

tag=v0.5.0
tag="invalid"

while getopts "t:" opt; do
case $opt in
t)
tag=$OPTARG
;;

?)
echo "Options not used"
exit 1
;;
esac
done

if [ "${tag}" == "invalid" ]; then
echo "Maybe you forgot to use -t flag. E.g. sh auto-release-darwin-arm64.sh -t v0.6.0"
exit 1
fi
echo "tag: ${tag}"

user=devstream-io
repo=devstream
Expand Down Expand Up @@ -32,8 +52,6 @@ make build -j8
# install github-release for uploading
go install github.com/github-release/github-release@latest



# upload dtm
echo 'Uploading 'dtm-${GOOS}-${GOARCH}' ...'
github-release upload --security-token $github_token --user $user --repo $repo --tag $tag --file dtm --name dtm-${GOOS}-${GOARCH}
Expand All @@ -42,4 +60,4 @@ echo dtm-${GOOS}-${GOARCH}' uploaded.'
# upload plugins and .md5 files
# In order to upload plug-ins to s3, you need to download awscli. After downloading awscli, you need to configure aws credentials.
pip3 install awscli
aws s3 cp $plugin_dir s3://download.devstream.io/${tag} --recursive --acl public-read
aws s3 cp $plugin_dir s3://download.devstream.io/${tag} --recursive --acl public-read
File renamed without changes.

0 comments on commit ff6aa82

Please sign in to comment.