-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
67 lines (58 loc) · 2.65 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
os: linux
compiler: gcc
env:
global:
- GIT_NAME: "FreeMiNT Project"
- GIT_EMAIL: "[email protected]"
- GIT_REPOSITORY: "[email protected]:freemint/tos.hyp.git"
before_install:
- if [ "${TRAVIS_PULL_REQUEST}" = "false" -a "${TRAVIS_BRANCH}" = "master" -a "${TRAVIS_REPO_SLUG}" = "freemint/tos.hyp" ];
then
openssl aes-256-cbc -K $encrypted_e5cfea0e0f2e_key -iv $encrypted_e5cfea0e0f2e_iv -in .travis/deploy-key.enc -out .travis/deploy-key -d;
fi
before_script:
# - svn co "svn://udo-open-source.org/UDO/trunk" "/tmp/udo"
# - cd "/tmp/udo/Source" && make -f Makefile.linux
# - UDO="/tmp/udo/Source/udo"
- mkdir -p "/tmp/udo"
- cd "/tmp/udo"
- wget "http://www.tho-otto.de/download/udo-7.12-linux.tar.bz2"
- tar xjf udo-7.12-linux.tar.bz2
- UDO="/tmp/udo/udo"
- cd -
- cd "/tmp"
- wget "http://tho-otto.de/download/hcp-1.0.3-linux.tar.bz2"
- tar xjf hcp-1.0.3-linux.tar.bz2
- HCP="/tmp/hcp-1.0.3/bin/hcp"
- cd -
script:
- mkdir -p "gh-pages/de/bilder" "gh-pages/en/bilder" "gh-pages/archives"
- cp -r "bilder/gif" "gh-pages/de/bilder"
- cp -r "bilder/gif" "gh-pages/en/bilder"
- cp "html/tos_hyp.gif" "gh-pages"
- $UDO --html -o "$PWD/gh-pages/index.html" "$PWD/html/tos_hyp.u"
- $UDO --html --tree -o "$PWD/gh-pages/de/index.html" "$PWD/tos_hyp.u"
- $UDO --stg --no-warningslines --check -o "$PWD/gh-pages/archives/tos_hyp_de.stg" "$PWD/tos_hyp.u"
- $HCP -z -o "gh-pages/archives/tos_hyp.hyp" "gh-pages/archives/tos_hyp_de.stg"
- cd "gh-pages/archives"
- zip -9 tos_hyp_de.zip "tos_hyp.hyp" "tos_hyp.ref"
- rm -f *.stg *.uhs *.uls *.hyp *.ref
- cd -
- sed -e 's/^#!language english/!language english/;' -e 's/^!language german/#!language german/;' config.u > config.u.tmp && mv config.u.tmp config.u
- $UDO --html --tree -o "$PWD/gh-pages/en/index.html" "$PWD/tos_hyp.u"
- $UDO --stg --no-warningslines --check -o "$PWD/gh-pages/archives/tos_hyp_en.stg" "$PWD/tos_hyp.u"
- $HCP -z -o "gh-pages/archives/tos_hyp.hyp" "gh-pages/archives/tos_hyp_en.stg"
- cd "gh-pages/archives"
- zip -9 tos_hyp_en.zip "tos_hyp.hyp" "tos_hyp.ref"
- rm -f *.stg *.uhs *.uls *.hyp *.ref
- cd -
after_success:
# publish only on master
- if [ "${TRAVIS_PULL_REQUEST}" = "false" -a "${TRAVIS_BRANCH}" = "master" -a "${TRAVIS_REPO_SLUG}" = "freemint/tos.hyp" ];
then
eval "$(ssh-agent -s)";
chmod 600 ".travis/deploy-key";
ssh-add ".travis/deploy-key";
cd gh-pages && git init && git config user.name "${GIT_NAME}" && git config user.email "${GIT_EMAIL}" &&
git add . && git commit -m "Publish ${TRAVIS_COMMIT}" && git push --force "${GIT_REPOSITORY}" master:gh-pages;
fi