-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (44 loc) · 2.05 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
sudo: required
dist: trusty
language: php
addons:
ssh_known_hosts: vmfds.de
before_install:
- |
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -q "Heft.sla"
then
echo "Heft.sla not updated, stopping build process."
exit
fi
- sudo add-apt-repository -y ppa:scribus/ppa
- sudo apt-get -qq update
- sudo apt-get install -y xvfb scribus-ng sshpass rsync
- sudo timedatectl set-timezone Europe/Berlin
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3
- export TRAVIS_DATE=$(date -u +"%d.%m.%Y, %H:%M Uhr")
- export BASE_VERSION=$(cat .travis/BASE_VERSION)
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export VERSION_STRING="$BASE_VERSION (build $TRAVIS_BUILD)" ; fi
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export FILE_VERSION="$BASE_VERSION-$TRAVIS_BUILD" ; fi
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export DEV_VERSION_STRING="" ; fi
- if [[ "$TRAVIS_BRANCH" != "master" ]]; then export VERSION_STRING="$BASE_VERSION-$TRAVIS_BRANCH (build $TRAVIS_BUILD vom $TRAVIS_DATE)" ; fi
- if [[ "$TRAVIS_BRANCH" != "master" ]]; then export FILE_VERSION="$TRAVIS_BRANCH-$BASE_VERSION-$TRAVIS_BUILD_NUMBER" ; fi
- if [[ "$TRAVIS_BRANCH" != "master" ]]; then export DEV_VERSION_STRING="$TRAVIS_BRANCH-$BASE_VERSION-$TRAVIS_BUILD_NUMBER vom $TRAVIS_DATE" ; fi
- sed -i "s/###VERSION###/$VERSION_STRING vom $TRAVIS_DATE/g" Heft.sla
- sed -i "s/###DEV_VERSION###/$DEV_VERSION_STRING/g" Heft.sla
script:
- sudo cp -R Grafik/Schriftarten /usr/share/fonts/truetype
- sudo fc-cache -f -v
- scribus-ng -g -py .travis/lehrerheft.py -pa verbose -- Heft.sla
- mv Heft.pdf Lehrerheft-$FILE_VERSION.pdf
- scribus-ng -g -py .travis/schuelerheft.py -pa verbose -- Heft.sla
- mv Heft.pdf Schuelerheft-$FILE_VERSION.pdf
after_success:
- eval "$(ssh-agent -s)"
- ssh-keyscan $SSHHOST >> ~/.ssh/known_hosts
- sshpass -p $SSHPASS rsync -avz -e "ssh" --progress *.pdf $SSHUSER@$SSHHOST:/home/$SSHUSER/crosswalk/build/
- sshpass -p $SSHPASS ssh $SSHUSER@$SSHHOST '~/crosswalk/build/deploy.sh'
notifications:
slack: crosswalk-material:JFrq9PxxfmJmKv9I1mMvrSFz