-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
38 lines (30 loc) · 1.56 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
language: objective-c
sudo: false
env:
global:
- GIT_COMMITTER_NAME=niku
- GIT_COMMITTER_EMAIL=niku@niku.name
- GIT_AUTHOR_NAME=niku
- GIT_AUTHOR_EMAIL=niku@niku.name
- secure: "HmiPlPDg/Kc9+EbdiK2S/l+9mH+g+ZzeHBqndiHs7VCFhg5PZrxNlh395lsLrKrjlm7L1o2b4BSOATxZ61ob22Z6R1n+ku06OokDLREANHgkOperM+Hpk49yMTFHByoxneY75VU92Q+4sD9jsC6VJ8ycSdv2hOSE52gjHtijeBc="
branches:
only:
- master
before_install:
- brew update
install:
- brew install ant
- brew install closure-compiler
- git clone https://github.com/cocos2d/cocos2d-console.git $HOME/cocos2d-console -b v3
before_script:
- export COCOS_CONSOLE_ROOT="$HOME/cocos2d-console/bin"
- export PATH="$COCOS_CONSOLE_ROOT:$PATH"
- export ANT_ROOT="/usr/local/bin"
script:
- echo "no" | cocos compile --platform web --source-map --advanced --verbose
after_success:
- (git clone git://github.com/$TRAVIS_REPO_SLUG.git $HOME/html --reference $TRAVIS_BUILD_DIR -b gh-pages && cd $HOME/html && git rm -rf .) || (git clone git://github.com/$TRAVIS_REPO_SLUG.git $HOME/html --reference $TRAVIS_BUILD_DIR && cd $HOME/html && git checkout --orphan gh-pages && git rm -rf .)
- mv simulator/html5/* $HOME/html/
- ruby -i -pe 'puts %Q!"sourceRoot":"https://raw.githubusercontent.com/#{ENV["TRAVIS_REPO_SLUG"]}/#{ENV["TRAVIS_COMMIT"]}",! if $. == 4' $HOME/html/sourcemap
- ruby -i -pe 'gsub %r!"../../!, "\""' $HOME/html/sourcemap
- cd $HOME/html && git add . && git commit -a -m "Built by $TRAVIS_COMMIT" && git push --set-upstream --quiet https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages 2> /dev/null