-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
.build.yml
68 lines (64 loc) · 2.4 KB
/
.build.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
##########################################################
# THE FOLLOWING LINES IS USED BY docker-build
##########################################################
requires:
archlinux:
- java-runtime-headless
- java-runtime=8
- jpegoptim
- nikola
- openssh
- optipng
- python-ghp-import
- python-typogrify
- rsync
- tar
- unzip
before_scripts:
- cd ${START_DIR}
- mkdir -p yui-compressor-builds
- cd yui-compressor-builds
- if [ ! -f yuicompressor-2.4.8.jar ];then
- curl -Ls -o yuicompressor-2.4.8.jar https://github.com/yui/yuicompressor/releases/download/v2.4.8/yuicompressor-2.4.8.jar
- curl -Ls -o yuicompressor.sh https://aur.archlinux.org/cgit/aur.git/plain/yuicompressor.sh?h=yuicompressor
- sed -i "s|x\.y\.z|2.4.8|" yuicompressor.sh
- install -D -m644 yuicompressor-2.4.8.jar /usr/share/java/yuicompressor-2.4.8.jar
- install -D -m755 yuicompressor.sh /usr/bin/yuicompressor
- fi
build_scripts:
- if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_BRANCH" != "master" ]]; then
- sed -i '/SITE_URL/s!//mate-desktop.org/!//preview.mate-desktop.dev/!' conf.py
- sed -i '/WEBSITE_PREVIEW/s!False!True!' conf.py
- sed -i 's!PREVIEW_COMMITID!'${TRAVIS_COMMIT:0:12}'!' conf.py
- fi
- if [ -f cache/.doit.db ];then
- cp cache/.doit.db . # Restore from cache
- fi
- nikola build
after_scripts:
- cd ${START_DIR}
- rsync -a --delete output/ www/
- cp .doit.db cache
- find www -type d -exec chmod 755 {} \;
- find www -type f -exec chmod 644 {} \;
- if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_BRANCH" != "master" ]]; then
- echo 'preview.mate-desktop.dev' > www/CNAME
- fi
releases:
scripts_release:
- cd $TRAVIS_BUILD_DIR
- if [ ! -d ~/.ssh ];then
- mkdir -p ~/.ssh/
- chmod 700 ~/.ssh/
- fi
- openssl aes-256-cbc -K $KEY_KB4VKL2L4TA5APOT -iv $IVS_WD0JIBOJGJW5QPAH -in scripts/data.bin -out ~/.ssh/id_rsa -d
- chmod 600 ~/.ssh/id_rsa
- if [ -f ~/.ssh/config ];then
- mv ~/.ssh/config ~/.config.bak
- fi
- echo -e "Host *\n\tStrictHostKeyChecking=no\n\tUserKnownHostsFile=/dev/null\n" > ~/.ssh/config
- 'rsync -a -e "ssh -o StrictHostKeyChecking=no" --delete www/ [email protected]:mate-desktop.org/'
- rm -f ~/.ssh/id_rsa
- if [ -f ~/.config.bak ];then
- mv ~/.config.bak ~/.ssh/config
- fi