Skip to content

Commit

Permalink
Add Autodeploy function to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Agocs | MobileDev | Wanari committed Jul 15, 2019
1 parent 0d2a398 commit 09413b1
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 6 deletions.
48 changes: 47 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ jobs:
script: ./tool/travis.sh dartanalyzer
env: PKG="rosetta"
dart: dev
- stage: publish_dry
name: "SDK: stable - DIR: rosetta - TASKS: pub publish --dry-run"
script: ./tool/travis.sh command_0
env: PKG="rosetta"
dart: stable
- stage: publish_dry
name: "SDK: dev - DIR: rosetta - TASKS: pub publish --dry-run"
script: ./tool/travis.sh command_0
env: PKG="rosetta"
dart: dev
- stage: publish
name: "SDK: stable - DIR: rosetta - TASKS: pub publish"
script: ./tool/travis.sh command_1
env: PKG="rosetta"
dart: stable
- stage: publish
name: "SDK: dev - DIR: rosetta - TASKS: pub publish"
script: ./tool/travis.sh command_1
env: PKG="rosetta"
dart: dev
- stage: analyze
name: "SDK: stable - DIR: rosetta_generator - TASKS: dartfmt -n --set-exit-if-changed ."
script: ./tool/travis.sh dartfmt
Expand All @@ -43,14 +63,40 @@ jobs:
script: ./tool/travis.sh dartanalyzer
env: PKG="rosetta_generator"
dart: dev
- stage: publish_dry
name: "SDK: stable - DIR: rosetta_generator - TASKS: pub publish --dry-run"
script: ./tool/travis.sh command_0
if: branch = development
env: PKG="rosetta_generator"
dart: stable
- stage: publish_dry
name: "SDK: dev - DIR: rosetta_generator - TASKS: pub publish --dry-run"
script: ./tool/travis.sh command_0
if: branch = development
env: PKG="rosetta_generator"
dart: dev
- stage: publish
name: "SDK: stable - DIR: rosetta_generator - TASKS: pub publish"
script: ./tool/travis.sh command_1
if: branch = stable
env: PKG="rosetta_generator"
dart: stable
- stage: publish
name: "SDK: dev - DIR: rosetta_generator - TASKS: pub publish"
script: ./tool/travis.sh command_1
if: branch = stable
env: PKG="rosetta_generator"
dart: dev

stages:
- analyze
- publish_dry
- publish

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

cache:
Expand Down
10 changes: 9 additions & 1 deletion mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@ travis:
chrome: stable
branches:
only:
- master
- stable
- development
stages:
- name: analyze
if: 'true'
- name: publish_dry
if: 'true'
- name: publish
if: 'branch = stable'
6 changes: 5 additions & 1 deletion rosetta/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ dart:
stages:
- analyze:
- dartfmt
- dartanalyzer: --fatal-infos --fatal-warnings .
- dartanalyzer: --fatal-infos --fatal-warnings .
- publish_dry:
- command: pub publish --dry-run
- publish:
- command: pub publish
2 changes: 1 addition & 1 deletion rosetta/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >-
Annotation library used to simplify localization
in Flutter. The library also uses a generator
dependency called "rosetta_generator".
version: 0.1.3
version: 0.1.4
authors:
- Adam Hosszu <edemlonger@gmail.com>
- Renato Kiss <renato.kiss.dev@gmail.com>
Expand Down
6 changes: 5 additions & 1 deletion rosetta_generator/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ dart:
stages:
- analyze:
- dartfmt
- dartanalyzer: --fatal-infos --fatal-warnings .
- dartanalyzer: --fatal-infos --fatal-warnings .
- publish_dry:
- command: pub publish --dry-run
- publish:
- command: pub publish
2 changes: 1 addition & 1 deletion rosetta_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >-
Generator tool used with Rosetta annotations.
This generates the helper and delegate classes
for Flutter localizations.
version: 0.1.3
version: 0.1.4
authors:
- Adam Hosszu <edemlonger@gmail.com>
- Renato Kiss <renato.kiss.dev@gmail.com>
Expand Down
10 changes: 10 additions & 0 deletions tool/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ EXIT_CODE=0
while (( "$#" )); do
TASK=$1
case $TASK in
command_0) echo
echo -e '\033[1mTASK: command_0\033[22m'
echo -e 'pub publish --dry-run'
pub publish --dry-run || EXIT_CODE=$?
;;
command_1) echo
echo -e '\033[1mTASK: command_1\033[22m'
echo -e 'pub publish'
pub publish || EXIT_CODE=$?
;;
dartanalyzer) echo
echo -e '\033[1mTASK: dartanalyzer\033[22m'
echo -e 'dartanalyzer --fatal-infos --fatal-warnings .'
Expand Down

0 comments on commit 09413b1

Please sign in to comment.