File tree Expand file tree Collapse file tree 2 files changed +26
-6
lines changed
Expand file tree Collapse file tree 2 files changed +26
-6
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # This script prepares build artifacts for upload to pub.
4+ #
5+ # Usage:
6+ #
7+ # scripts/publish/pub_prepare.sh PACKAGE_NAME
8+
9+ set -ex
10+ shopt -s extglob
11+
12+ NAME=$1
13+ ROOT_DIR=$( cd $( dirname $0 ) /../..; pwd)
14+ cd $ROOT_DIR
15+
16+ PKG_DIR=$ROOT_DIR /dist/pub
17+ FILES=' !(e2e_test|pubspec.lock)'
18+
19+ PUBLISH_DIR=$PKG_DIR /$NAME
20+ rm -fr $PUBLISH_DIR
21+ mkdir -p $PUBLISH_DIR
22+
23+ cp -RP $ROOT_DIR /dist/dart/$NAME /$FILES $PUBLISH_DIR
24+
25+ node scripts/publish/pubspec_cleaner.js --pubspec-file=$PUBLISH_DIR /pubspec.yaml
Original file line number Diff line number Diff line change @@ -21,17 +21,12 @@ gulp build.dart.material
2121
2222PKG_DIR=$ROOT_DIR /dist/pub
2323rm -fr $PKG_DIR
24- FILES=' !(e2e_test|pubspec.lock)'
2524
2625function publishModule {
2726 NAME=$1
2827 PUBLISH_DIR=$PKG_DIR /$NAME
29- rm -fr $PUBLISH_DIR
30- mkdir -p $PUBLISH_DIR
3128
32- cp -RP $ROOT_DIR /dist/dart/$NAME /$FILES $PUBLISH_DIR
33-
34- node scripts/publish/pubspec_cleaner.js --pubspec-file=$PUBLISH_DIR /pubspec.yaml
29+ scripts/publish/pub_prepare.sh $NAME
3530
3631 if [[ " $DRY_RUN " == " false" ]]; then
3732 (cd $PUBLISH_DIR && pub publish -f)
You can’t perform that action at this time.
0 commit comments