aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/jenkins
diff options
context:
space:
mode:
authorTobias Bosch2013-12-13 12:49:42 -0800
committerTobias Bosch2013-12-13 12:51:13 -0800
commit8c10db384727643265b1550543011d3193dfe557 (patch)
tree836f583f1618e6dc1814afc6ee9265957402b74a /scripts/jenkins
parent03088d60109582fa5e966ad8425b3de9d9152b6a (diff)
downloadangular.js-8c10db384727643265b1550543011d3193dfe557.tar.bz2
chore(build): automate cutting a release, publishing to bower and to code.angular.js
Diffstat (limited to 'scripts/jenkins')
-rwxr-xr-xscripts/jenkins/master.sh14
-rw-r--r--scripts/jenkins/release.sh29
2 files changed, 43 insertions, 0 deletions
diff --git a/scripts/jenkins/master.sh b/scripts/jenkins/master.sh
new file mode 100755
index 00000000..1e32ead2
--- /dev/null
+++ b/scripts/jenkins/master.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e # fail if any command fails
+cd `dirname $0`/../..
+
+# Build
+./jenkins_build.sh
+
+# Update code.angularjs.org
+VERSION=`cat build/version.txt`
+curl http://code.angularjs.org/fetchLatestSnapshot.php?ver=$VERSION
+
+# Push to bower
+./scripts/bower/publish.sh \ No newline at end of file
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
+
+