aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/bower
diff options
context:
space:
mode:
authorTobias Bosch2013-12-13 20:02:15 -0800
committerTobias Bosch2013-12-13 21:49:05 -0800
commit9a4c9e6487e0f51275a7820d0c162aceeadbf561 (patch)
treeefce73ed82268c92c4b3bfa03c9ed1c44d053b6b /scripts/bower
parent11fff8fa0d370e2f20284510ad0e52cdf3bcb2a3 (diff)
downloadangular.js-9a4c9e6487e0f51275a7820d0c162aceeadbf561.tar.bz2
chore(build): correct and refactor release script
Diffstat (limited to 'scripts/bower')
-rwxr-xr-xscripts/bower/publish.sh25
1 files changed, 16 insertions, 9 deletions
diff --git a/scripts/bower/publish.sh b/scripts/bower/publish.sh
index fec1927d..2549a139 100755
--- a/scripts/bower/publish.sh
+++ b/scripts/bower/publish.sh
@@ -1,19 +1,21 @@
#!/bin/bash
-#
-# update all the things
-#
-
-set -e # fail if any command fails
+echo "#################################"
+echo "#### Update bower ###############"
+echo "#################################"
+# Enable tracing and exit on first failure
+set -xe
+# Normalize working dir to script dir
cd `dirname $0`
+
SCRIPT_DIR=`pwd`
+# export so that node.js can read those env settings
export TMP_DIR=../../tmp
-
export BUILD_DIR=../../build
-NEW_VERSION=$(node -e "console.log(require(process.env.BUILD_DIR+'/version.json').full)" | sed -e 's/\r//g')
+NEW_VERSION=`cat $BUILD_DIR/version.txt`
REPOS=(
angular \
@@ -34,6 +36,7 @@ REPOS=(
#
for repo in "${REPOS[@]}"
do
+ echo "-- Cloning bower-$repo"
git clone git@github.com:angular/bower-$repo.git $TMP_DIR/bower-$repo
done
@@ -46,6 +49,7 @@ for repo in "${REPOS[@]}"
do
if [ -f $BUILD_DIR/$repo.js ] # ignore i18l
then
+ echo "-- Updating files in bower-$repo"
cd $TMP_DIR/bower-$repo
git reset --hard HEAD
git checkout master
@@ -78,12 +82,15 @@ echo $NEW_VERSION
for repo in "${REPOS[@]}"
do
+ echo "-- Updating version in bower-$repo from $OLD_VERSION to $NEW_VERSION"
cd $TMP_DIR/bower-$repo
sed -i '' -e "s/$OLD_VERSION/$NEW_VERSION/g" bower.json
git add -A
+
+ echo "-- Committing, tagging and pushing bower-$repo"
git commit -m "v$NEW_VERSION"
git tag v$NEW_VERSION
- # TODO git push origin master
- # TODO git push origin v$NEW_VERSION
+ git push origin master
+ git push origin v$NEW_VERSION
cd $SCRIPT_DIR
done