mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-16 02:33:09 +00:00
chore(build): correct updating bower versions
This commit is contained in:
parent
b0474cb984
commit
6144df52af
2 changed files with 7 additions and 18 deletions
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
Script for updating the Angular bower repos from current local build.
|
Script for updating the Angular bower repos from current local build.
|
||||||
|
|
||||||
Requires `node` (for parsing `bower.json`)
|
|
||||||
|
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
|
|
||||||
`grunt package`: Build angular locally
|
`grunt package`: Build angular locally
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,8 @@ set -xe
|
||||||
cd `dirname $0`
|
cd `dirname $0`
|
||||||
|
|
||||||
SCRIPT_DIR=`pwd`
|
SCRIPT_DIR=`pwd`
|
||||||
|
TMP_DIR=../../tmp
|
||||||
# export so that node.js can read those env settings
|
BUILD_DIR=../../build
|
||||||
export TMP_DIR=../../tmp
|
|
||||||
export BUILD_DIR=../../build
|
|
||||||
|
|
||||||
NEW_VERSION=`cat $BUILD_DIR/version.txt`
|
NEW_VERSION=`cat $BUILD_DIR/version.txt`
|
||||||
|
|
||||||
REPOS=(
|
REPOS=(
|
||||||
|
|
@ -67,14 +64,6 @@ cp $BUILD_DIR/i18n/*.js $TMP_DIR/bower-angular-i18n/
|
||||||
cp $BUILD_DIR/angular-csp.css $TMP_DIR/bower-angular
|
cp $BUILD_DIR/angular-csp.css $TMP_DIR/bower-angular
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# get the old version number
|
|
||||||
#
|
|
||||||
|
|
||||||
OLD_VERSION=$(node -e "console.log(require(process.env.TMP_DIR+'/bower-angular/bower').version)" | sed -e 's/\r//g')
|
|
||||||
echo $OLD_VERSION
|
|
||||||
echo $NEW_VERSION
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# update bower.json
|
# update bower.json
|
||||||
# tag each repo
|
# tag each repo
|
||||||
|
|
@ -82,9 +71,12 @@ echo $NEW_VERSION
|
||||||
|
|
||||||
for repo in "${REPOS[@]}"
|
for repo in "${REPOS[@]}"
|
||||||
do
|
do
|
||||||
echo "-- Updating version in bower-$repo from $OLD_VERSION to $NEW_VERSION"
|
echo "-- Updating version in bower-$repo to $NEW_VERSION"
|
||||||
cd $TMP_DIR/bower-$repo
|
cd $TMP_DIR/bower-$repo
|
||||||
sed -i '' -e "s/$OLD_VERSION/$NEW_VERSION/g" bower.json
|
sed -i .tmp -E 's/"(version)":[ ]*".*"/"\1": "'$NEW_VERSION'"/g' bower.json
|
||||||
|
sed -i .tmp -E 's/"(angular.*)":[ ]*".*"/"\1": "'$NEW_VERSION'"/g' bower.json
|
||||||
|
# delete tmp files
|
||||||
|
rm *.tmp
|
||||||
git add -A
|
git add -A
|
||||||
|
|
||||||
echo "-- Committing, tagging and pushing bower-$repo"
|
echo "-- Committing, tagging and pushing bower-$repo"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue