Skip to content

WIP: Repo mono #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# Created with https://github.com/dart-lang/mono_repo
language: dart
sudo: false

dart:
- dev
- stable
dart_task:
# Run the tests -- include the default-skipped presubmit tests
- test: --run-skipped
- dartfmt: sdk
- dartanalyzer

env:
- PKG=json_serializable TASK=dartanalyzer
- PKG=json_serializable TASK=dartfmt
- PKG=json_serializable TASK=test

matrix:
exclude:
- dart: stable
dart_task:
dartfmt: sdk
env: PKG=json_serializable TASK=dartfmt

script: ./tool/travis.sh

# Only building master means that we don't run two builds for each pull request.
branches:
only: [master]

cache:
directories:
- $HOME/.pub-cache
directories:
- $HOME/.pub-cache
24 changes: 24 additions & 0 deletions json_serializable/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: dart
sudo: false
dart:
- dev
- stable
dart_task:
# Run the tests -- include the default-skipped presubmit tests
- test: --run-skipped
- dartfmt: sdk
- dartanalyzer

matrix:
exclude:
- dart: stable
dart_task:
dartfmt: sdk

# Only building master means that we don't run two builds for each pull request.
branches:
only: [master]

cache:
directories:
- $HOME/.pub-cache
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions tool/travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# Created with https://github.com/dart-lang/mono_repo

# Fast fail the script on failures.
set -e

if [ -z "$PKG" ]; then
echo -e "PKG environment variable must be set!"
exit 1
elif [ -z "$TASK" ]; then
echo -e "TASK environment variable must be set!"
exit 1
fi

pushd $PKG
pub upgrade

case $TASK in
dartanalyzer) echo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, I have never used a case statement in a shell script before......... this syntax is insane lol

echo -e "TASK: dartanalyzer"
dartanalyzer .
;;
dartfmt) echo
echo -e "TASK: dartfmt"
dartfmt -n --set-exit-if-changed .
;;
test) echo
echo -e "TASK: test"
pub run test --run-skipped
;;
*) echo -e "Not expecting TASK '${TASK}'. Error!"
exit 1
;;
esac