aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/jenkins/release.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/jenkins/release.sh')
-rw-r--r--scripts/jenkins/release.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/jenkins/release.sh b/scripts/jenkins/release.sh
new file mode 100644
index 00000000..88198d81
--- /dev/null
+++ b/scripts/jenkins/release.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -e # fail if any command fails
+cd `dirname $0`/../..
+
+# bump versions: remove "-snapshot" suffix
+sed -i -e 's/"version": "\(.*\)-snapshot"/"version": "\1"/' package.json
+
+# Build
+./jenkins_build.sh
+
+VERSION=`cat build/version.txt`
+
+# bump versions: increment version number and add "-snapshot" again
+grunt bump:$BUMP_TYPE
+sed -i -e 's/"version": "\(.*\)"/"version": "\1-snapshot"/' package.json
+
+# commit, tag and push
+git commit -m "chore(release): v%VERSION%"
+git tag -m "v%VERSION%" v%VERSION%
+# TODO git push
+
+# Update code.angularjs.org
+./scripts/code.angularjs.org/publish.sh
+
+# Push to bower
+./scripts/bower/publish.sh
+
+