forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpub_publish.sh
More file actions
executable file
·44 lines (33 loc) · 831 Bytes
/
pub_publish.sh
File metadata and controls
executable file
·44 lines (33 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
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Publishes Angular 2 packages to pub.
set -ex
shopt -s extglob
DRY_RUN=false
if [[ $1 == '--dry_run' ]]; then
DRY_RUN=true
fi;
ROOT_DIR=$(cd $(dirname $0)/../..; pwd)
cd $ROOT_DIR
gulp clean
gulp build/packages.dart
gulp build/pubspec.dart
gulp build/analyze.dart
gulp build.dart.material
PKG_DIR=$ROOT_DIR/dist/pub
rm -fr $PKG_DIR
FILES='!(e2e_test|pubspec.lock)'
function publishModule {
NAME=$1
PUBLISH_DIR=$PKG_DIR/$NAME
rm -fr $PUBLISH_DIR
mkdir -p $PUBLISH_DIR
cp -RP $ROOT_DIR/dist/dart/$NAME/$FILES $PUBLISH_DIR
node scripts/publish/pubspec_cleaner.js --pubspec-file=$PUBLISH_DIR/pubspec.yaml
if [[ "$DRY_RUN" == "false" ]]; then
(cd $PUBLISH_DIR && pub publish -f)
fi;
}
publishModule angular2
publishModule benchpress
publishModule benchmarks
publishModule angular2_material