Init
This commit is contained in:
commit
0029086b3f
148 changed files with 19047 additions and 0 deletions
25
packages/api/scripts/deploy.sh
Executable file
25
packages/api/scripts/deploy.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CURRENT_DIR="$(pwd -P)"
|
||||
PARENT_PATH="$(
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")" || exit
|
||||
pwd -P
|
||||
)/.."
|
||||
cd "$PARENT_PATH" || exit
|
||||
|
||||
STAGE=$1
|
||||
|
||||
. ../../scripts/project-variables.sh
|
||||
. ../../scripts/get-stack-outputs.sh "$STAGE" >/dev/null
|
||||
npx serverless deploy --verbose --stage "$STAGE" --region "$REGION"
|
||||
|
||||
# check if npx serverless deploy was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Deploy successful"
|
||||
else
|
||||
echo "Deploy failed"
|
||||
cd "$CURRENT_DIR" || exit
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$CURRENT_DIR" || exit
|
Loading…
Add table
Add a link
Reference in a new issue