-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
71 lines (62 loc) · 2.01 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
sudo: false
language: python
cache:
directories:
- $HOME/env
before_install:
- pip install hererocks
- hererocks $HOME/env --luajit 2.0.4 --luarocks latest
- source $HOME/env/bin/activate
- git clone https://github.com/star-wars-vehicles/gluasrcdiet.git $HOME/gluasrcdiet
install:
- luarocks install lua-discount
- luarocks install ldoc
- cd $HOME/gluasrcdiet
- luarocks make
- cd $TRAVIS_BUILD_DIR
before_script:
- wget -O ldoc.css https://gist.githubusercontent.com/dhkatz/018661e82c4fb724c48962d8667d27fa/raw/3d1e00522012f87ae8980d07c77a1bbd4cb3d85d/ldoc.css
script:
- ldoc .
- mkdir -p ./build/lua;
- shopt -s globstar;
- for i in ./lua/**; do
if [ -f $i ]; then
outdir=${i#./lua/};
outdir=${outdir%/*.*};
mkdir -p ./build/lua/$outdir;
outfile=./build/lua/$outdir/$(basename $i .lua 2>&1)_.lua;
echo $i $outfile;
gluasrcdiet --quiet --none --opt-comments --opt-emptylines $i -o $outfile;
fi
done
- if [ -e ./materials/ ]; then cp -R ./materials/. ./build/materials; fi
- if [ -e ./models/ ]; then cp -R ./models/. ./build/models; fi
- if [ -e ./sound/ ]; then cp -R ./sound/. ./build/sound; fi
- cd ./build;
- zip -r9 ../star-wars-vehicles-redux.zip * > /dev/null 2>&1;
- cd $TRAVIS_BUILD_DIR;
after_script:
- rm -rf ./build
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh;
- chmod +x send.sh;
- ./send.sh success $WEBHOOK_URL;
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh;
- chmod +x send.sh;
- ./send.sh failure $WEBHOOK_URL;
deploy:
- provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
local-dir: docs
on:
branch: master
- provider: releases
api_key: $GITHUB_TOKEN
file: "star-wars-vehicles-redux.zip"
skip_cleanup: true
on:
tags: true