Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
huyikun.hyk committed Feb 26, 2024
1 parent 29035ff commit 6863aeb
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions script.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
set -e # 报错后不继续执行
version=$5
valid_version=(
v3.0.0
)
if [[ "${valid_version[@]}" =~ "${version}" ]]; then
# valid_version=(
# v3.0.0
# v3.0.1
# v3.0.2
# )
# if [[ "${valid_version[@]}" =~ "${version}" ]]; then
if [ ! -f "/usr/local/bin/s" ]; then
echo 'Serverless-devs installing.'
echo "https://images.devsapp.cn/bin/s/${version}"
curl "https://images.devsapp.cn/bin/s/${version}" --output /usr/local/bin/s
chmod 777 /usr/local/bin/s
echo '################################################'
s config add --AccountID $1 --AccessKeyID $2 --AccessKeySecret $3 -a $4 -f
echo '################################################'
npm install -g serverless-devs@${version}
echo 'Serverless-devs has been installed successfully.'
echo 'The access has been configured automatically, use "s config get" to check.'
else
echo $version "is not valid, please choose correct version."
# curl "https://images.devsapp.cn/bin/s/${version}" --output /usr/local/bin/s
# chmod 777 /usr/local/bin/s
fi
echo '################################################'
s config add --AccountID $1 --AccessKeyID $2 --AccessKeySecret $3 -a $4 -f
echo '################################################'
echo 'The access has been configured automatically, use "s config get" to check.'
# else
# echo $version "is not valid, please choose correct version."
# fi

0 comments on commit 6863aeb

Please sign in to comment.