summaryrefslogtreecommitdiffstats
path: root/scripts/publish.sh
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2017-01-13 16:18:28 +0100
committerSamy Pessé <samypesse@gmail.com>2017-01-13 16:18:28 +0100
commitaf80cbcd7c9c5f165da33d19c068086d884e8d9a (patch)
tree32abe81b3cc72047feb42efd392c41cb23fec2b5 /scripts/publish.sh
parenta84d02ece02fe801156d460a3b6ad083d3c2f7f4 (diff)
downloadgitbook-af80cbcd7c9c5f165da33d19c068086d884e8d9a.zip
gitbook-af80cbcd7c9c5f165da33d19c068086d884e8d9a.tar.gz
gitbook-af80cbcd7c9c5f165da33d19c068086d884e8d9a.tar.bz2
Add script to publish a new version
Diffstat (limited to 'scripts/publish.sh')
-rwxr-xr-xscripts/publish.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/publish.sh b/scripts/publish.sh
new file mode 100755
index 0000000..bbd5238
--- /dev/null
+++ b/scripts/publish.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+defaultTag=latest
+
+echo ""
+echo "You are trying to publish a new version of GitBook"
+echo "⚠️ Currently, because of NPM access, this script can only be run by Samy"
+echo ""
+echo "Steps:"
+echo " 1. Enter the new version"
+echo " 2. Packages will be published on NPM"
+echo " 3. Commit the changes with message 'Bump version to X 🚀 '"
+echo " 4. Tag the commit"
+echo " 5. Push"
+echo ""
+
+read -p "Version: " version
+read -p "NPM Tag [$defaultTag]:" tag
+tag=${tag:-$defaultTag}
+echo ""
+
+echo "You are going to publish version ${version} on NPM (tagged as ${tag})"
+echo "Press [ENTER] tp confirm"
+read
+
+lerna publish --skip-git --repo-version $[version] --npm-tag ${tag} --force-publish=*