-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (38 loc) · 1.4 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
branches:
only: gh-pages
language: erlang
otp_release: 17.5
env:
global:
- secure: "aoyYDVQ7fmBNkKUzW54gwZbiUL9J9TP6bHp6BB/YwQ8dA//aNdWXXg8Xanvqb9w2u7K8buCyMLLlyVy8dBqsba76yMmTnkN1tLiFMc9+TZeuK4bNv5ieZurOHPer3nFF8OPvJiBfYxsSnrrbjxeav4p71jPv8hcCtEJLMupVA/s="
sudo: false
script:
- set -e
- bash -c "[[ $TRAVIS_PULL_REQUEST != false ]]"
- ToDo=todo.txt
- Gen=gen
- cd $TRAVIS_BUILD_DIR
- bash -c "[[ -f $ToDo ]]" # Fail if not found
- mkdir other
- cp $ToDo $Gen
- export PR_commit=$TRAVIS_COMMIT
- git checkout gh-pages
- git clone https://github.com/erldocs/erldocs_other.git erldocs_other.git
- cd erldocs_other.git
- make -j app
- $TRAVIS_BUILD_DIR/long_running.sh $TRAVIS_BUILD_DIR $Gen
- cd $TRAVIS_BUILD_DIR
- mv other/ erldocs_other.git/ $ToDo $Gen ..
- echo 'apps = [' >apps.js
- find . -name meta.txt | cut -c3- | sed 's/.........$/",/' | sed 's/^/"/' | tr -d '\n' >>apps.js
- echo '];' >>apps.js
- git remote set-url --push origin https://[email protected]/erldocs/other.erldocs.com.git
- git config user.email [email protected]
- git config user.name 'Travis CI'
- echo '' >$ToDo
- git add -A .
- git commit -m "Successfully applied Pull Request \#$TRAVIS_PULL_REQUEST, please close PR & delete branch"
- git pull --no-edit --force origin gh-pages
- git push origin gh-pages
after_success:
- find . -name meta.txt | cut -c3- | sed 's/.........$//' | wc -l