Skip to content

Commit 45af02d

Browse files
committed
chore(build): simplify release scripts
1 parent 6144df5 commit 45af02d

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

Diff for: scripts/code.angularjs.org/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
Script for updating code.angularjs.org repo from current local build.
44

5-
Requires `node` (for parsing `bower.json`)
6-
7-
Note: This should only be run for a release build, not a snapshot build!
5+
Note: For a snapshot build, this will fetch the data from the ci server
6+
and NOT take the local build!
87

98
## Instructions
109

Diff for: scripts/code.angularjs.org/publish.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ set -xe
99
# Normalize working dir to script dir
1010
cd `dirname $0`
1111

12-
13-
# export so that node.js can read those env settings
14-
export TMP_DIR=../../tmp
15-
export REPO_DIR=$TMP_DIR/code.angularjs.org
16-
export BUILD_DIR=../../build
17-
12+
TMP_DIR=../../tmp
13+
REPO_DIR=$TMP_DIR/code.angularjs.org
14+
BUILD_DIR=../../build
1815
SCRIPT_DIR=`pwd`
1916
NEW_VERSION=`cat $BUILD_DIR/version.txt`
2017

Diff for: scripts/jenkins/bump-increment.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ cd `dirname $0`/../..
1717

1818
echo "-- increment version "
1919
grunt bump:$BUMP_TYPE
20-
NEXT_VERSION=$(node -e "console.log(require('./package.json').version)" | sed -e 's/\r//g')
21-
sed -i .tmp -e 's/"version": "\(.*\)"/"version": "\1-snapshot"/' package.json
20+
NEXT_VERSION=`sed -En 's/.*"version"[ ]*:[ ]*"(.*)".*/\1/p' package.json`
21+
sed -i .tmp -E 's/"version": "(.*)"/"version": "\1-snapshot"/' package.json
2222
echo "-- new version: `grep '"version"' package.json`"
2323
echo "-- commit"
2424
git add package.json

Diff for: scripts/jenkins/bump-remove-snapshot.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ set -xe
1010
cd `dirname $0`/../..
1111

1212
echo "-- old version: `grep '"version"' package.json`"
13-
sed -i .tmp -e 's/"version": "\(.*\)-snapshot"/"version": "\1"/' package.json
14-
VERSION=$(node -e "console.log(require('./package.json').version)" | sed -e 's/\r//g')
13+
sed -i .tmp -E 's/"version": "(.*)-snapshot"/"version": "\1"/' package.json
14+
VERSION=`sed -En 's/.*"version"[ ]*:[ ]*"(.*)".*/\1/p' package.json`
1515
echo "-- local version: $VERSION"
1616

1717
echo "-- commit and tag with v$VERSION"

0 commit comments

Comments
 (0)