2015-03-02 12:43:56 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Publishes Angular 2 packages to pub.
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
shopt -s extglob
|
|
|
|
|
2015-06-18 19:07:35 -04:00
|
|
|
DRY_RUN=false
|
|
|
|
if [[ $1 == '--dry_run' ]]; then
|
|
|
|
DRY_RUN=true
|
|
|
|
fi;
|
|
|
|
|
2015-03-02 12:43:56 -05:00
|
|
|
ROOT_DIR=$(cd $(dirname $0)/../..; pwd)
|
|
|
|
cd $ROOT_DIR
|
|
|
|
|
|
|
|
gulp clean
|
|
|
|
gulp build/packages.dart
|
2015-04-13 21:34:34 -04:00
|
|
|
gulp build/pubspec.dart
|
2015-03-02 12:43:56 -05:00
|
|
|
gulp build/analyze.dart
|
2015-06-18 19:07:35 -04:00
|
|
|
gulp build.dart.material
|
2015-03-02 12:43:56 -05:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2015-07-28 16:10:25 -04:00
|
|
|
#if [[ "$DRY_RUN" == "false" ]]; then
|
|
|
|
# (cd $PUBLISH_DIR && pub publish -f)
|
|
|
|
#fi;
|
2015-03-02 12:43:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
publishModule angular2
|
|
|
|
publishModule benchpress
|
2015-03-02 18:54:02 -05:00
|
|
|
publishModule benchmarks
|
2015-06-18 19:07:35 -04:00
|
|
|
publishModule angular2_material
|