aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTobias Bosch2013-12-13 14:13:23 -0800
committerTobias Bosch2013-12-13 14:13:23 -0800
commit6d01384a55a2e0550eb8a0844b500c3bf0fdc588 (patch)
tree2371e7e6a4affe1d3ceacdd0e6ed38b4e1a81bdc /scripts
parent109ffac97550596ffee66af15510f5f445ddc8dc (diff)
downloadangular.js-6d01384a55a2e0550eb8a0844b500c3bf0fdc588.tar.bz2
chore(build): fixes to release.sh
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/jenkins/release.sh28
1 files changed, 20 insertions, 8 deletions
diff --git a/scripts/jenkins/release.sh b/scripts/jenkins/release.sh
index 88198d81..4bb3b076 100755
--- a/scripts/jenkins/release.sh
+++ b/scripts/jenkins/release.sh
@@ -1,23 +1,35 @@
#!/bin/bash
+if [ -z "$1" ]; then
+ echo "Please specify the version bump type: patch|minor|major"
+ exit 1
+fi
+
set -e # fail if any command fails
cd `dirname $0`/../..
+BUMP_TYPE=$1
# bump versions: remove "-snapshot" suffix
-sed -i -e 's/"version": "\(.*\)-snapshot"/"version": "\1"/' package.json
+sed -i .tmp -e 's/"version": "\(.*\)-snapshot"/"version": "\1"/' package.json
# Build
-./jenkins_build.sh
-
+# ./jenkins_build.sh
+grunt package
VERSION=`cat build/version.txt`
-# bump versions: increment version number and add "-snapshot" again
+# Commit and tag
+git add package.json
+git commit -m "chore(release): v$VERSION"
+git tag -m "v$VERSION" v$VERSION
+
+# bump versions: increment version number and add "-snapshot"
grunt bump:$BUMP_TYPE
-sed -i -e 's/"version": "\(.*\)"/"version": "\1-snapshot"/' package.json
+NEXT_VERSION=$(node -e "console.log(require('./package.json').version)" | sed -e 's/\r//g')
+sed -i .tmp -e 's/"version": "\(.*\)"/"version": "\1-snapshot"/' package.json
+git add package.json
+git commit -m "chore(release): start v$NEXT_VERSION"
-# commit, tag and push
-git commit -m "chore(release): v%VERSION%"
-git tag -m "v%VERSION%" v%VERSION%
+# push to github
# TODO git push
# Update code.angularjs.org