diff --git a/.travis.yml b/.travis.yml index 6481eda2..f59efd86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,46 +1,51 @@ -# Created with package:mono_repo v2.3.0 +# Created with package:mono_repo v2.5.0 language: dart jobs: include: - - stage: build - name: "SDK: 2.9.3; PKG: examples/angular_components_example; TASKS: [`pub run build_runner build web`, `pub run build_runner build web --release`]" - dart: "2.9.3" - os: linux - env: PKGS="examples/angular_components_example" - script: ./tool/travis.sh command_1 command_2 - - stage: build - name: "SDK: dev; PKG: examples/angular_components_example; TASKS: [`pub run build_runner build web`, `pub run build_runner build web --release`]" - dart: dev + - stage: mono_repo_self_validate + name: mono_repo self validate os: linux - env: PKGS="examples/angular_components_example" - script: ./tool/travis.sh command_1 command_2 + script: tool/mono_repo_self_validate.sh - stage: analyze_and_format name: "SDK: 2.9.3; PKGS: angular_components, angular_gallery, angular_gallery_section; TASKS: `dartanalyzer --fatal-warnings .`" dart: "2.9.3" os: linux env: PKGS="angular_components angular_gallery angular_gallery_section" - script: ./tool/travis.sh dartanalyzer + script: tool/travis.sh dartanalyzer - stage: analyze_and_format name: "SDK: dev; PKGS: angular_components, angular_gallery, angular_gallery_section; TASKS: [`dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-warnings .`]" dart: dev os: linux env: PKGS="angular_components angular_gallery angular_gallery_section" - script: ./tool/travis.sh dartfmt dartanalyzer + script: tool/travis.sh dartfmt dartanalyzer - stage: unit_test name: "SDK: 2.9.3; PKG: angular_components; TASKS: [`./tool/travis/install_protoc.sh`, `pub run test --run-skipped`]" dart: "2.9.3" os: linux env: PKGS="angular_components" - script: ./tool/travis.sh command_0 test + script: tool/travis.sh command_0 test - stage: unit_test name: "SDK: dev; PKG: angular_components; TASKS: [`./tool/travis/install_protoc.sh`, `pub run test --run-skipped`]" dart: dev os: linux env: PKGS="angular_components" - script: ./tool/travis.sh command_0 test + script: tool/travis.sh command_0 test + - stage: build + name: "SDK: 2.9.3; PKG: examples/angular_components_example; TASKS: [`pub run build_runner build web`, `pub run build_runner build web --release`]" + dart: "2.9.3" + os: linux + env: PKGS="examples/angular_components_example" + script: tool/travis.sh command_1 command_2 + - stage: build + name: "SDK: dev; PKG: examples/angular_components_example; TASKS: [`pub run build_runner build web`, `pub run build_runner build web --release`]" + dart: dev + os: linux + env: PKGS="examples/angular_components_example" + script: tool/travis.sh command_1 command_2 stages: + - mono_repo_self_validate - analyze_and_format - unit_test - build diff --git a/angular_components/mono_pkg.yaml b/angular_components/mono_pkg.yaml index d5d4b2fd..7dfabeca 100644 --- a/angular_components/mono_pkg.yaml +++ b/angular_components/mono_pkg.yaml @@ -1,4 +1,4 @@ -# See https://github.com/dart-lang/mono_repo for details +# See https://github.com/google/mono_repo.dart for details dart: - 2.9.3 - dev diff --git a/angular_gallery/mono_pkg.yaml b/angular_gallery/mono_pkg.yaml index 62741240..8a6484a1 100644 --- a/angular_gallery/mono_pkg.yaml +++ b/angular_gallery/mono_pkg.yaml @@ -1,4 +1,4 @@ -# See https://github.com/dart-lang/mono_repo for details +# See https://github.com/google/mono_repo.dart for details stages: - analyze_and_format: - group: diff --git a/angular_gallery_section/mono_pkg.yaml b/angular_gallery_section/mono_pkg.yaml index 62741240..8a6484a1 100644 --- a/angular_gallery_section/mono_pkg.yaml +++ b/angular_gallery_section/mono_pkg.yaml @@ -1,4 +1,4 @@ -# See https://github.com/dart-lang/mono_repo for details +# See https://github.com/google/mono_repo.dart for details stages: - analyze_and_format: - group: diff --git a/examples/angular_components_example/mono_pkg.yaml b/examples/angular_components_example/mono_pkg.yaml index c8a2598b..dc6f54d3 100644 --- a/examples/angular_components_example/mono_pkg.yaml +++ b/examples/angular_components_example/mono_pkg.yaml @@ -1,4 +1,4 @@ -# See https://github.com/dart-lang/mono_repo for details +# See https://github.com/google/mono_repo.dart for details dart: - 2.9.3 - dev diff --git a/mono_repo.yaml b/mono_repo.yaml index b9602d22..daf9ccad 100644 --- a/mono_repo.yaml +++ b/mono_repo.yaml @@ -1,16 +1,11 @@ -# See with https://github.com/dart-lang/mono_repo for details on this file - -# TODO: Clean up stages after https://github.com/dart-lang/mono_repo/issues/149 -# and https://github.com/dart-lang/mono_repo/issues/150 +# See with https://github.com/google/mono_repo.dart for details on this file +self_validate: true travis: stages: - - name: analyze_and_format - if: 'true' - - name: unit_test - if: 'true' - - name: build - if: 'true' + - analyze_and_format + - unit_test + - build merge_stages: - analyze_and_format diff --git a/tool/mono_repo_self_validate.sh b/tool/mono_repo_self_validate.sh new file mode 100755 index 00000000..ec70a289 --- /dev/null +++ b/tool/mono_repo_self_validate.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Created with package:mono_repo v2.5.0 + +# Support built in commands on windows out of the box. +function pub { + if [[ $TRAVIS_OS_NAME == "windows" ]]; then + command pub.bat "$@" + else + command pub "$@" + fi +} + +set -v -e +pub global activate mono_repo 2.5.0 +pub global run mono_repo travis --validate diff --git a/tool/travis.sh b/tool/travis.sh index 31e8254c..dc18fcf3 100755 --- a/tool/travis.sh +++ b/tool/travis.sh @@ -1,27 +1,27 @@ #!/bin/bash -# Created with package:mono_repo v2.3.0 +# Created with package:mono_repo v2.5.0 # Support built in commands on windows out of the box. function pub { - if [[ $TRAVIS_OS_NAME == "windows" ]]; then - command pub.bat "$@" - else - command pub "$@" - fi + if [[ $TRAVIS_OS_NAME == "windows" ]]; then + command pub.bat "$@" + else + command pub "$@" + fi } function dartfmt { - if [[ $TRAVIS_OS_NAME == "windows" ]]; then - command dartfmt.bat "$@" - else - command dartfmt "$@" - fi + if [[ $TRAVIS_OS_NAME == "windows" ]]; then + command dartfmt.bat "$@" + else + command dartfmt "$@" + fi } function dartanalyzer { - if [[ $TRAVIS_OS_NAME == "windows" ]]; then - command dartanalyzer.bat "$@" - else - command dartanalyzer "$@" - fi + if [[ $TRAVIS_OS_NAME == "windows" ]]; then + command dartanalyzer.bat "$@" + else + command dartanalyzer "$@" + fi } if [[ -z ${PKGS} ]]; then