angular-cn/scripts/publish/pub_publish.sh

39 lines
626 B
Bash
Raw Normal View History

2015-03-02 12:43:56 -05:00
#!/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;
2015-03-02 12:43:56 -05:00
ROOT_DIR=$(cd $(dirname $0)/../..; pwd)
cd $ROOT_DIR
gulp clean
gulp build/packages.dart
gulp build/pubspec.dart
2015-03-02 12:43:56 -05:00
gulp build/analyze.dart
PKG_DIR=$ROOT_DIR/dist/pub
rm -fr $PKG_DIR
function publishModule {
NAME=$1
PUBLISH_DIR=$PKG_DIR/$NAME
scripts/publish/pub_prepare.sh $NAME
2015-03-02 12:43:56 -05: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
publishModule benchmarks
publishModule angular2_testing