File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 55
66# Make sure dartfmt is run on everything
77echo " Checking dart format..."
8- needs_dartfmt =" $( dart format --set-exit-if-changed --output=none lib test dev) "
8+ needs_dart_format =" $( dart format --set-exit-if-changed --output=none lib test dev 2>&1 ) "
99if [[ $? != 0 ]]; then
1010 echo " FAILED"
11- echo " $needs_dartfmt "
11+ echo " $needs_dart_format "
1212 exit 1
1313fi
1414echo " PASSED"
1515
1616# Make sure we pass the analyzer
1717echo " Checking dartanalyzer..."
18- fails_analyzer=" $( find lib test dev -name " *.dart" | xargs dartanalyzer --options analysis_options.yaml) "
18+ fails_analyzer=" $( find lib test dev -name " *.dart" --print0 | xargs -0 dartanalyzer --options analysis_options.yaml 2>&1 ) "
1919if [[ " $fails_analyzer " == * " [error]" * ]]; then
2020 echo " FAILED"
2121 echo " $fails_analyzer "
2222 exit 1
2323fi
2424echo " PASSED"
2525
26+ # Make sure we could publish if we wanted to.
27+ echo " Checking publishing..."
28+ fails_publish=" $( pub publish --dry-run 2>&1 ) "
29+ if [[ $? != 0 ]]; then
30+ echo " FAILED"
31+ echo " $fails_publish "
32+ exit 1
33+ fi
34+ echo " PASSED"
35+
2636# Fast fail the script on failures.
2737set -e
2838
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ description: A pluggable, mockable platform abstraction for Dart.
44homepage : https://github.com/google/platform.dart
55
66environment :
7- sdk : ' >=2.12.0-0 <3.0.0'
7+ sdk : ' >=2.12.0 <3.0.0'
88
99dev_dependencies :
1010 test : ^1.16.8
You can’t perform that action at this time.
0 commit comments