forked from pbek/QOwnNotes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (61 loc) · 1.93 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
language: cpp
os:
- linux
- osx
env:
global:
- secure: Wt43koA55PGba7TsJ85f9vHyW4b/QfPh2Ywhw5+40sba5Us4Y3h+l23VyVjQbXuHfCGgC+t5+AABm1ubhL4MjCvxzS9BepjhNN92LPXoLfBRM2AHhNLWMKLLxt4T7OofjnLPw21l6cjjVrlZZojVbN4MnuG2IPUeUzoEBuA5TPE=
matrix:
- CONFIG=release
- CONFIG=debug
install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
&& sudo apt-add-repository -y ppa:beineri/opt-qt541
&& sudo apt-get -qq update
&& sudo apt-get -qq install g++-4.8 libc6-i386 qt54tools qt54svg qt54webkit qt54creator
&& export CXX="g++-4.8"
&& export CC="gcc-4.8"
;
else
brew update
&& brew install qt5
&& brew install qt5-qmake
&& chmod -R 755 /usr/local/opt/qt5/*
;
fi
script:
- /opt/qt54/bin/qt54-env.sh
- cd src
- echo "#define BUILD ""$TRAVIS_BUILD_NUMBER" > build_number.h
- /opt/qt54/bin/qmake -project
- /opt/qt54/bin/qmake QOwnNotes.pro CONFIG+=$CONFIG
- make
before_deploy:
#
# create debian package
#
- cd ../travis
- dpkg-deb -x QOwnNotes.deb build
- mv ../src/QOwnNotes build/opt/QOwnNotes/
- sed -i 's/TRAVIS_BUILD_NUMBER/'"$TRAVIS_BUILD_NUMBER"'/g' build/DEBIAN/control
- dpkg -b build QOwnNotes.deb
#
# add a tag
#
- git config --global user.email "builds@travis-ci.com"
- git config --global user.name "Travis CI"
- export GIT_TAG=linux-b$TRAVIS_BUILD_NUMBER
- git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER"
- git push -q https://$TAGPERM@github.com/pbek/QOwnNotes --tags
deploy:
provider: releases
api_key:
secure: EyOMTm+fzo7rWhRMfROH8/jeJnSFmLFz4pfD/HuFJI2ohayHJOIfASMdg0d7N2cGFS9G7iuPUmQ1S56YC8BSnEefc3lASB1i5hiSOMWJV+lO3N1JBFCWxCBzHc9Hs+XKwHwyhZ5iIYncx+JHPYRNWtUD+A6SZHiZ+sVI48gYMyA=
file: QOwnNotes.deb
skip_cleanup: true
on:
repo: pbek/QOwnNotes
branch: master
tags: false
condition: $CONFIG = release