Skip to content

Commit

Permalink
run latest mono_repo
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed May 10, 2019
1 parent 7d34c9e commit 7d0eb73
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 36 deletions.
32 changes: 16 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Created with package:mono_repo v2.0.0
# Created with package:mono_repo v2.1.0
language: dart

# Custom configuration
Expand All @@ -21,10 +21,10 @@ jobs:
env: PKGS="api_benchmark"
script: ./tool/travis.sh command_0 dartfmt dartanalyzer_0
- stage: format_analyzer_tests
name: "SDK: stable; PKG: query_benchmark; TASKS: [`./compile_protos.sh`, `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-warnings .`]"
name: "SDK: stable; PKG: protobuf; TASKS: `dartanalyzer --fatal-warnings .`"
dart: stable
env: PKGS="query_benchmark"
script: ./tool/travis.sh command_0 dartfmt dartanalyzer_0
env: PKGS="protobuf"
script: ./tool/travis.sh dartanalyzer_0
- stage: format_analyzer_tests
name: "SDK: dev; PKG: protobuf; TASKS: `dartanalyzer --fatal-infos --fatal-warnings .`"
dart: dev
Expand All @@ -36,20 +36,15 @@ jobs:
env: PKGS="protobuf"
script: ./tool/travis.sh dartfmt
- stage: format_analyzer_tests
name: "SDK: stable; PKG: protobuf; TASKS: `dartanalyzer --fatal-warnings .`"
dart: stable
name: "SDK: dev; PKG: protobuf; TASKS: `pub run test`"
dart: dev
env: PKGS="protobuf"
script: ./tool/travis.sh dartanalyzer_0
script: ./tool/travis.sh test
- stage: format_analyzer_tests
name: "SDK: stable; PKG: protobuf; TASKS: `pub run test`"
dart: stable
env: PKGS="protobuf"
script: ./tool/travis.sh test
- stage: format_analyzer_tests
name: "SDK: dev; PKG: protobuf; TASKS: `pub run test`"
dart: dev
env: PKGS="protobuf"
script: ./tool/travis.sh test
- stage: format_analyzer_tests
name: "SDK: dev; PKG: protoc_plugin; TASKS: [`make protos`, `dartanalyzer --fatal-infos --fatal-warnings .`]"
dart: dev
Expand All @@ -61,15 +56,20 @@ jobs:
env: PKGS="protoc_plugin"
script: ./tool/travis.sh command_1 dartfmt dartanalyzer_0
- stage: format_analyzer_tests
name: "SDK: stable; PKG: protoc_plugin; TASKS: [`make protos`, `pub run test`]"
dart: stable
name: "SDK: dev; PKG: protoc_plugin; TASKS: [`make protos`, `pub run test`]"
dart: dev
env: PKGS="protoc_plugin"
script: ./tool/travis.sh command_1 test
- stage: format_analyzer_tests
name: "SDK: dev; PKG: protoc_plugin; TASKS: [`make protos`, `pub run test`]"
dart: dev
name: "SDK: stable; PKG: protoc_plugin; TASKS: [`make protos`, `pub run test`]"
dart: stable
env: PKGS="protoc_plugin"
script: ./tool/travis.sh command_1 test
- stage: format_analyzer_tests
name: "SDK: stable; PKG: query_benchmark; TASKS: [`./compile_protos.sh`, `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-warnings .`]"
dart: stable
env: PKGS="query_benchmark"
script: ./tool/travis.sh command_0 dartfmt dartanalyzer_0

stages:
- format_analyzer_tests
Expand Down
37 changes: 17 additions & 20 deletions tool/travis.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Created with package:mono_repo v2.0.0
# Created with package:mono_repo v2.1.0

if [[ -z ${PKGS} ]]; then
echo -e '\033[31mPKGS environment variable must be set!\033[0m'
Expand All @@ -19,38 +19,35 @@ for PKG in ${PKGS}; do
pub upgrade --no-precompile || exit $?

for TASK in "$@"; do
echo
echo -e "\033[1mPKG: ${PKG}; TASK: ${TASK}\033[22m"
case ${TASK} in
command_0) echo
echo -e '\033[1mTASK: command_0\033[22m'
echo -e './compile_protos.sh'
command_0)
echo './compile_protos.sh'
./compile_protos.sh || EXIT_CODE=$?
;;
command_1) echo
echo -e '\033[1mTASK: command_1\033[22m'
echo -e 'make protos'
command_1)
echo 'make protos'
make protos || EXIT_CODE=$?
;;
dartanalyzer_0) echo
echo -e '\033[1mTASK: dartanalyzer_0\033[22m'
echo -e 'dartanalyzer --fatal-warnings .'
dartanalyzer_0)
echo 'dartanalyzer --fatal-warnings .'
dartanalyzer --fatal-warnings . || EXIT_CODE=$?
;;
dartanalyzer_1) echo
echo -e '\033[1mTASK: dartanalyzer_1\033[22m'
echo -e 'dartanalyzer --fatal-infos --fatal-warnings .'
dartanalyzer_1)
echo 'dartanalyzer --fatal-infos --fatal-warnings .'
dartanalyzer --fatal-infos --fatal-warnings . || EXIT_CODE=$?
;;
dartfmt) echo
echo -e '\033[1mTASK: dartfmt\033[22m'
echo -e 'dartfmt -n --set-exit-if-changed .'
dartfmt)
echo 'dartfmt -n --set-exit-if-changed .'
dartfmt -n --set-exit-if-changed . || EXIT_CODE=$?
;;
test) echo
echo -e '\033[1mTASK: test\033[22m'
echo -e 'pub run test'
test)
echo 'pub run test'
pub run test || EXIT_CODE=$?
;;
*) echo -e "\033[31mNot expecting TASK '${TASK}'. Error!\033[0m"
*)
echo -e "\033[31mNot expecting TASK '${TASK}'. Error!\033[0m"
EXIT_CODE=1
;;
esac
Expand Down

0 comments on commit 7d0eb73

Please sign in to comment.