This repository has been archived by the owner on Nov 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
51 lines (46 loc) · 1.97 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
env:
global:
- USER="AEEooTO"
- EMAIL="[email protected]"
- DEPLOYMENT_USER="traviscibot"
- REPO="pindery"
- DOC_FILES="./doc/api/*"
- GH_REPO="github.com/${USER}/${REPO}.git"
- BRANCH="gh-pages"
addons:
apt:
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
sources:
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
packages:
- libstdc++6
- fonts-droid
before_script:
- git clone https://github.com/flutter/flutter.git -b beta
- export PATH=`pwd`/flutter/bin:$PATH
- ./flutter/bin/flutter doctor
- sudo apt-get update
- sudo apt-get install apt-transport-https
- sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
- sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
- sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_unstable.list > /etc/apt/sources.list.d/dart_unstable.list'
- sudo apt-get update
- sudo apt-get install dart # Install Dart (for dartdoc)
script:
- flutter packages get # Install dependencies
- flutter test # Run tests
- /usr/lib/dart/bin/dartdoc # Generate documentation
after_success:
- git clone git://${GH_REPO} # Clone the target repo locally
- cd ${REPO} # Enter the repo folder
- git checkout ${BRANCH} # Go to the $BRANCH branch (declared previously)
- rm -rf ./doc # Delete the previous docs folder
- mkdir doc # Create the new folder
- cp -f -r ../${DOC_FILES} ./doc/ # Copy the previously generated documentation
- ls -a # List folder element for debug purposes
- git remote # Configure git
- git config user.email ${EMAIL}
- git config user.name ${DEPLOYMENT_USER}
- git add . # Add new changes to git
- git commit -m 'Commit with Travis CI' # Commit
- git push "https://${GITHUB_TOKEN}@${GH_REPO}" ${BRANCH} # Push on the repo