-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
66 lines (61 loc) · 1.75 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
# To auto build what we need.
env:
- CABALVER=1.22 GHCVER=7.10.2
before_install:
- "sudo add-apt-repository -y ppa:hvr/ghc"
- "sudo apt-get update && sudo apt-get install --no-install-recommends texlive-xetex latex-xcolor texlive-fonts-recommended texlive-latex-extra lmodern texlive-latex-recommended"
- "sudo apt-get install ttf-wqy-microhei ttf-wqy-zenhei"
- "sudo apt-get install ghc-$GHCVER cabal-install-$CABALVER"
- "export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH"
- "cabal update"
- "cabal install directory"
- "cabal install 'warp < 3.2'"
- "cabal install yesod -j9"
- "cabal install persistent-postgresql"
- "cabal install pureMD5"
- "cabal install SHA"
- "cabal install cmdargs"
script:
- cd src
- xelatex BackEnd.tex
- xelatex BackEnd.tex
- xelatex BackEnd.tex
- cd ..
- cabal configure -fdocker-launch
- cabal build
- cabal sdist
- cabal install dist/YrarbilBackend-*.tar.gz
after_success: |
if [ -n "$GITHUB_API_KEY" ]; then
git config --global user.name "travis_auto"
git config --global user.email "[email protected]"
echo '\nconfig done\n'
cd ~
git clone https://qinka:[email protected]/XDUDsTeam/YrarbilRelease.git
echo "clone done"
cd YrarbilRelease
ls
pwd
export RELPATH=$(pwd)
ls
pwd
cd "$TRAVIS_BUILD_DIR"/src
ls
pwd
cp *.pdf $RELPATH
echo "copy done"
cd "$TRAVIS_BUILD_DIR"/dist
cp *.tar.gz $RELPATH
cd $RELPATH
echo " " >> ChangeLog.md
echo "$(date)" >>ChangeLog.md
echo " " >> ChangeLog.md
echo "Travis-CI build YrarbilBackend's new push."
git add .
git commit -am"$(date)"
echo "commit done"
git push origin master
cd ~
sudo rm -rf $RELPATH
cd "$TRAVIS_BUILD_DIR"
fi