aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/build/ship.sh
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-09-10 22:11:26 -0700
committerzotlabs <mike@macgirvin.com>2018-09-10 22:11:26 -0700
commitadc164b825c3b9e322921f2da9d1baf178b04cd3 (patch)
treefa5e805e53e7661ad936873e1a66017ad9dcd6a9 /vendor/twbs/bootstrap/build/ship.sh
parentbe3b6304742a6c39d73674b1f7422c029e7cd804 (diff)
parentc6abe87ec2e08fc38ff9c505ac2000d52d45c228 (diff)
downloadvolse-hubzilla-adc164b825c3b9e322921f2da9d1baf178b04cd3.tar.gz
volse-hubzilla-adc164b825c3b9e322921f2da9d1baf178b04cd3.tar.bz2
volse-hubzilla-adc164b825c3b9e322921f2da9d1baf178b04cd3.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'vendor/twbs/bootstrap/build/ship.sh')
-rw-r--r--vendor/twbs/bootstrap/build/ship.sh70
1 files changed, 70 insertions, 0 deletions
diff --git a/vendor/twbs/bootstrap/build/ship.sh b/vendor/twbs/bootstrap/build/ship.sh
new file mode 100644
index 000000000..e3b256e91
--- /dev/null
+++ b/vendor/twbs/bootstrap/build/ship.sh
@@ -0,0 +1,70 @@
+#!/usr/bin/env bash
+#
+# Usage
+# ---------------
+# 1. Clone second version of Bootstrap in sibling directory named `bs-docs`.
+# 2. Within `bs-docs` copy, switch to `gh-pages` branch.
+# 3. Pull latest, re-bundle, re-npm.
+# 4. Run script.
+
+red=$'\e[1;31m'
+green=$'\e[1;32m'
+#blue=$'\e[1;34m'
+magenta=$'\e[1;35m'
+#cyan=$'\e[1;36m'
+end=$'\e[0m'
+
+# Get current version from package.json
+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
+ 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
+git pull origin v4-dev
+
+# Update version number
+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"
+
+# Compile latest CSS and JS
+printf "\n%s=======================================================%s" $magenta $end
+printf "\n%sCompile latest CSS and JS...%s" $magenta $end
+printf "\n%s=======================================================\n%s" $magenta $end
+npm run dist
+
+# Generate the SRI hashes
+printf "\n%s=======================================================%s" $magenta $end
+printf "\n%sGenerate the SRI hashes...%s" $magenta $end
+printf "\n%s=======================================================\n%s" $magenta $end
+npm run release-sri
+
+# Compress the dist files
+printf "\n%s=======================================================%s" $magenta $end
+printf "\n%sCompressing the dist files...%s" $magenta $end
+printf "\n%s=======================================================\n%s" $magenta $end
+npm run release-zip
+
+# Compile the docs
+printf "\n%s=======================================================%s" $magenta $end
+printf "\n%sCompile hosted documentation...%s" $magenta $end
+printf "\n%s=======================================================\n%s" $magenta $end
+npm run docs-github
+
+# 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
+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