From c3772f2345115f96b5d448188c5ff58f56847d23 Mon Sep 17 00:00:00 2001 From: Marco Bonelli Date: Mon, 4 Feb 2019 23:34:33 +0100 Subject: [PATCH] Deploy: run all commands separately to avoid unnoticed errors. --- scripts/deploy.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 5f3891c2b..a876a5008 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # This script is executed by Travis CI when a PR is merged (i.e. in the `deploy` step). -set -ev +set -ex function initialize { if [ -z "$TLDRHOME" ]; then @@ -27,12 +27,14 @@ function initialize { function rebuild_index { npm run build-index + echo "Rebuilding index done." } function build_archive { rm -f $TLDR_ARCHIVE cd $TLDRHOME/ zip -r $TLDR_ARCHIVE pages*/ LICENSE.md + echo "Pages archive created." } function upload_assets { @@ -44,6 +46,8 @@ function upload_assets { git add -A git commit -m "[TravisCI] uploaded assets after commits ${TRAVIS_COMMIT_RANGE}" git push -q + + echo "Assets (pages archive, index) deployed to static site." } ################################### @@ -51,6 +55,6 @@ function upload_assets { ################################### initialize -rebuild_index && echo "Rebuilding index done." -build_archive && echo "Pages archive created." -upload_assets && echo "Assets (pages archive, index) deployed to static site." +rebuild_index +build_archive +upload_assets