forked from cicorias/angular-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-angular.sh
More file actions
executable file
·31 lines (26 loc) · 831 Bytes
/
Copy pathupdate-angular.sh
File metadata and controls
executable file
·31 lines (26 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh
NG_BUILD_DIR=$1
if [[ ! -e "$NG_BUILD_DIR/angular.js" ]]; then
echo "Usage: update-angular <build-dir>"
exit 1
fi
SCRIPT_DIR=$(dirname $0)
ROOT_DIR=$SCRIPT_DIR/../
VERSION=$(cat $NG_BUILD_DIR/version.txt)
cd $ROOT_DIR
rm -fr app/lib/angular
mkdir app/lib/angular
cp -r $NG_BUILD_DIR/* app/lib/angular
rm -fr app/lib/angular/docs
rm app/lib/angular/*.zip
mv app/lib/angular/angular-mocks.js test/lib/angular
mv app/lib/angular/angular-scenario.js test/lib/angular
cp app/lib/angular/version.txt test/lib/angular
# Update the inlined angular-loader in app/index-async.html
sed '/@@NG_LOADER@@/{
s/@@NG_LOADER@@//g
r app/lib/angular/angular-loader.min.js
}' app/index-async.html.template > app/index-async.html
git add $ROOT_DIR/app
git add $ROOT_DIR/test
git commit -m "update(angular): bump to $VERSION"