chore(build): simplify release scripts

This commit is contained in:
Tobias Bosch 2013-12-16 09:47:51 -08:00
parent 6144df52af
commit 45af02de04
4 changed files with 9 additions and 13 deletions

View file

@ -2,9 +2,8 @@
Script for updating code.angularjs.org repo from current local build.
Requires `node` (for parsing `bower.json`)
Note: This should only be run for a release build, not a snapshot build!
Note: For a snapshot build, this will fetch the data from the ci server
and NOT take the local build!
## Instructions

View file

@ -9,12 +9,9 @@ set -xe
# Normalize working dir to script dir
cd `dirname $0`
# export so that node.js can read those env settings
export TMP_DIR=../../tmp
export REPO_DIR=$TMP_DIR/code.angularjs.org
export BUILD_DIR=../../build
TMP_DIR=../../tmp
REPO_DIR=$TMP_DIR/code.angularjs.org
BUILD_DIR=../../build
SCRIPT_DIR=`pwd`
NEW_VERSION=`cat $BUILD_DIR/version.txt`

View file

@ -17,8 +17,8 @@ cd `dirname $0`/../..
echo "-- increment version "
grunt bump:$BUMP_TYPE
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
NEXT_VERSION=`sed -En 's/.*"version"[ ]*:[ ]*"(.*)".*/\1/p' package.json`
sed -i .tmp -E 's/"version": "(.*)"/"version": "\1-snapshot"/' package.json
echo "-- new version: `grep '"version"' package.json`"
echo "-- commit"
git add package.json

View file

@ -10,8 +10,8 @@ set -xe
cd `dirname $0`/../..
echo "-- old version: `grep '"version"' package.json`"
sed -i .tmp -e 's/"version": "\(.*\)-snapshot"/"version": "\1"/' package.json
VERSION=$(node -e "console.log(require('./package.json').version)" | sed -e 's/\r//g')
sed -i .tmp -E 's/"version": "(.*)-snapshot"/"version": "\1"/' package.json
VERSION=`sed -En 's/.*"version"[ ]*:[ ]*"(.*)".*/\1/p' package.json`
echo "-- local version: $VERSION"
echo "-- commit and tag with v$VERSION"