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:
authorMark Otto <markdotto@gmail.com>2017-08-13 02:05:25 +0300
committerMark Otto <markd.otto@gmail.com>2017-10-03 06:46:19 +0300
commit90da657546cbac2f992437a0b0d5238d9d2c760a (patch)
treefa8d918753c651018f9ef3522b6d0924bf7121bd /build
parentcd8fd1d2bcc101e6e3066f142a61f92babb191d2 (diff)
initial pass at a build bash script for myself
Diffstat (limited to 'build')
-rwxr-xr-xbuild/ship.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/build/ship.sh b/build/ship.sh
new file mode 100755
index 0000000000..7549f9adca
--- /dev/null
+++ b/build/ship.sh
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+#
+# Before using, clone second version of Bootstrap into `bs-docs` folder and switch to `gh-pages` branch there.
+
+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${red}⚠️ Shipping aborted. You must specify a version.\n${end}"
+ exit 1
+fi
+
+# Pulling latest changes, just to be sure
+printf "\n${magenta}🚧 Pulling latest changes...\n\n${end}"
+git pull origin v4-dev
+
+# Update version number
+printf "\n${magenta}🚧 Updating version number...\n${end}"
+npm run release-version $current_version $1
+
+# Compile latest CSS and JS
+printf "\n${magenta}🚧 Compile latest CSS and JS...\n${end}"
+npm run dist
+
+# Compress the dist files
+printf "\n${magenta}🚧 Compressing the dist files...\n${end}"
+npm run release-zip
+
+# Compile the docs
+printf "\n${magenta}🚧 Compile hosted documentation...\n${end}"
+npm run docs-github
+
+# Copy the contents of the built docs site over to `bs-docs` repo
+printf "\n${magenta}🚧 Copy it over...\n${end}"
+cp -rf _gh_pages/. ../alt-repo/
+
+printf "\n${green}🏁 Success, $1 is ready to review and publish.\n${end}"