From 9832b94c5b6dea5ceb749703973b4c44c2059b2d Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 3 Jan 2017 00:45:49 -0500 Subject: [PATCH] Cleanup for v2.0.0 (#49) * Cleanup for v2.0.0 * CHANGELOG --- CHANGELOG.md | 4 ++++ lib/mockito_no_mirrors.dart | 18 ------------------ tool/travis.sh | 28 ++++++++++++++++++++++++---- 3 files changed, 28 insertions(+), 22 deletions(-) delete mode 100644 lib/mockito_no_mirrors.dart diff --git a/CHANGELOG.md b/CHANGELOG.md index 476fd92d..a0643722 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.0 + +* Removed `mockito_no_mirrors.dart` + ## 2.0.0-dev * Remove export of `spy` and any `dart:mirrors` based API from diff --git a/lib/mockito_no_mirrors.dart b/lib/mockito_no_mirrors.dart deleted file mode 100644 index 7c356655..00000000 --- a/lib/mockito_no_mirrors.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2016 Dart Mockito authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -@Deprecated('Import "package:mockito/mockito.dart" instead.') -library mockito.mockito_no_mirrors; - -export 'mockito.dart'; diff --git a/tool/travis.sh b/tool/travis.sh index 60fca55e..4d2387ab 100755 --- a/tool/travis.sh +++ b/tool/travis.sh @@ -14,10 +14,30 @@ #!/bin/bash -# Fast fail the script on failures. -set -e +# Make sure dartfmt is run on everything +# This assumes you have dart_style as a dev_dependency +echo "Checking dartfmt..." +NEEDS_DARTFMT="$(find lib test -name "*.dart" | xargs dartfmt -n)" +if [[ ${NEEDS_DARTFMT} != "" ]] +then + echo "FAILED" + echo "${NEEDS_DARTFMT}" + exit 1 +fi +echo "PASSED" + +# Make sure we pass the analyzer +echo "Checking dartanalyzer..." +FAILS_ANALYZER="$(find lib test -name "*.dart" | xargs dartanalyzer --options .analysis_options)" +if [[ $FAILS_ANALYZER == *"[error]"* ]] +then + echo "FAILED" + echo "${FAILS_ANALYZER}" + exit 1 +fi +echo "PASSED" -# Verify that the libraries are error free. -find . -maxdepth 2 -name *.dart | xargs dartanalyzer --fatal-warnings +# Fail on anything that fails going forward. +set -e pub run test