Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2020-03-05 18:06:18 +0300
committerGitHub <noreply@github.com>2020-03-05 18:06:18 +0300
commit8abccff7b3939334c61286df448d0f730da85325 (patch)
tree551eb5efdf70cc4b1fc27709ad58e4ea0d426377 /build
parentd9215ebd5a70ed84ea34337036a712d189fc6b91 (diff)
build/ship.sh: shellcheck fixes. (#30197)
Also add `set -e` so that if a command fails the whole script fails too.
Diffstat (limited to 'build')
-rw-r--r--build/ship.sh35
1 files changed, 19 insertions, 16 deletions
diff --git a/build/ship.sh b/build/ship.sh
index acce9b9228..ce4f7cded1 100644
--- a/build/ship.sh
+++ b/build/ship.sh
@@ -1,4 +1,7 @@
#!/usr/bin/env bash
+
+set -e
+
#
# Usage
# ---------------
@@ -18,35 +21,35 @@ end=$'\e[0m'
current_version=$(node -p "require('./package.json').version")
if [[ $# -lt 1 ]]; then
- printf "\n%s⚠️ Shipping aborted. You must specify a version.\n%s" $red $end
+ printf "\n%s⚠️ Shipping aborted. You must specify a version.\n%s" "$red" "$end"
exit 1
fi
# Pulling latest changes, just to be sure
-printf "\n%s=======================================================%s" $magenta $end
-printf "\n%sPulling latest changes...%s" $magenta $end
-printf "\n%s=======================================================\n\n%s" $magenta $end
+printf "\n%s=======================================================%s" "$magenta" "$end"
+printf "\n%sPulling latest changes...%s" "$magenta" "$end"
+printf "\n%s=======================================================\n\n%s" "$magenta" "$end"
git pull origin master
# Update version number
-printf "\n%s=======================================================%s" $magenta $end
-printf "\n%sUpdating version number...%s" $magenta $end
-printf "\n%s=======================================================\n%s" $magenta $end
+printf "\n%s=======================================================%s" "$magenta" "$end"
+printf "\n%sUpdating version number...%s" "$magenta" "$end"
+printf "\n%s=======================================================\n%s" "$magenta" "$end"
npm run release-version "$current_version" "$1"
# Build release
-printf "\n%s=======================================================%s" $magenta $end
-printf "\n%sBuilding release...%s" $magenta $end
-printf "\n%s=======================================================\n%s" $magenta $end
+printf "\n%s=======================================================%s" "$magenta" "$end"
+printf "\n%sBuilding release...%s" "$magenta" "$end"
+printf "\n%s=======================================================\n%s" "$magenta" "$end"
npm run release
# Copy the contents of the built docs site over to `bs-docs` repo
-printf "\n%s=======================================================%s" $magenta $end
-printf "\n%sCopy it over...%s" $magenta $end
-printf "\n%s=======================================================\n%s" $magenta $end
+printf "\n%s=======================================================%s" "$magenta" "$end"
+printf "\n%sCopy it over...%s" "$magenta" "$end"
+printf "\n%s=======================================================\n%s" "$magenta" "$end"
cp -rf _gh_pages/. ../bs-docs/
printf "\nDone!\n"
-printf "\n%s=======================================================%s" $green $end
-printf "\n%sSuccess, $1 is ready to review and publish.%s" $green $end
-printf "\n%s=======================================================\n\n%s" $green $end
+printf "\n%s=======================================================%s" "$green" "$end"
+printf "\n%sSuccess, $1 is ready to review and publish.%s" "$green" "$end"
+printf "\n%s=======================================================\n\n%s" "$green" "$end"