mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
Add error handling for netlify deployment
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
30620a60e6
commit
3b446a605d
2 changed files with 12 additions and 0 deletions
|
@ -6,6 +6,12 @@
|
|||
|
||||
json=$(yarn netlify deploy --build --prod --json --message "${1:0:8}: $2")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error while executing netlify! Will try again without json..."
|
||||
yarn netlify deploy --build --prod --message "${1:0:8}: $2"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${json}"
|
||||
|
||||
url=$(echo "${json}" | jq -r .deploy_url)
|
||||
|
|
|
@ -6,6 +6,12 @@
|
|||
|
||||
json=$(yarn netlify deploy --build --context deploy-preview --alias "$1" --json --message "[#$1] $2")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error while executing netlify! Will try again without json..."
|
||||
yarn netlify deploy --build --context deploy-preview --alias "$1" --message "[#$1] $2"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${json}"
|
||||
|
||||
url=$(echo "${json}" | jq -r .deploy_url)
|
||||
|
|
Loading…
Reference in a new issue