forked from nuttyartist/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
118 lines (108 loc) · 5.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
sudo: required
dist: trusty
language: cpp
env:
- QT_BASE=53
- QT_BASE=55
- QT_BASE=56
- QT_BASE=57
- QT_BASE=58
- QT_BASE=xenial
- QT_BASE=bionic
- QT_BASE=appimage
- QT_BASE=snap
service:
- docker
before_install:
- git fetch --unshallow
- if [ "$QT_BASE" = "53" ]; then sudo add-apt-repository ppa:beineri/opt-qt532-trusty -y; fi
- if [ "$QT_BASE" = "55" ]; then sudo add-apt-repository ppa:beineri/opt-qt551-trusty -y; fi
- if [ "$QT_BASE" = "56" ]; then sudo add-apt-repository ppa:beineri/opt-qt562-trusty -y; fi
- if [ "$QT_BASE" = "57" ]; then sudo add-apt-repository ppa:beineri/opt-qt571-trusty -y; fi
- if [ "$QT_BASE" = "58" ]; then sudo add-apt-repository ppa:beineri/opt-qt58-trusty -y; fi
- if [ "$QT_BASE" = "xenial" ]; then docker pull theshadowx/qt5:xenial; fi
- if [ "$QT_BASE" = "bionic" ]; then docker pull theshadowx/qt5:bionic; fi
- if [ "$QT_BASE" = "appimage" ]; then docker pull theshadowx/qt5:xenial; fi
- if [ "$QT_BASE" = "snap" ]; then docker pull theshadowx/qt5:bionic; fi
- sudo apt-get update -qq
install:
- sudo apt-get -y install software-properties-common checkinstall xvfb dh-make fakeroot gpgv2 tree
- if [ "$QT_BASE" == "53" ]; then sudo apt-get install -qq qt53base; source /opt/qt53/bin/qt53-env.sh; fi
- if [ "$QT_BASE" == "55" ]; then sudo apt-get install -qq qt55base; source /opt/qt55/bin/qt55-env.sh; fi
- if [ "$QT_BASE" == "56" ]; then sudo apt-get install -qq qt56base; source /opt/qt56/bin/qt56-env.sh; fi
- if [ "$QT_BASE" == "57" ]; then sudo apt-get install -qq qt57base; source /opt/qt57/bin/qt57-env.sh; fi
- if [ "$QT_BASE" == "58" ]; then sudo apt-get install -qq qt58base; source /opt/qt58/bin/qt58-env.sh; fi
before_script:
- if [ "$QT_BASE" == "53" ]; then qmake -v; fi
- if [ "$QT_BASE" == "55" ]; then qmake -v; fi
- if [ "$QT_BASE" == "56" ]; then qmake -v; fi
- if [ "$QT_BASE" == "57" ]; then qmake -v; fi
- if [ "$QT_BASE" == "58" ]; then qmake -v; fi
- if [ "$QT_BASE" == "xenial" ]; then docker run --rm -it theshadowx/qt5:xenial qmake -v; fi
- if [ "$QT_BASE" == "bionic" ]; then docker run --rm -it theshadowx/qt5:bionic qmake -v; fi
- mkdir build;
- cd build;
script:
- if [ "$QT_BASE" == "xenial" ]; then
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:xenial qmake ../src/;
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:xenial make deb;
sudo chmod -R 777 deb;
fi
- if [ "$QT_BASE" == "bionic" ]; then
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:bionic qmake ../src/;
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:bionic make deb;
sudo chmod -R 777 deb;
fi
- if [ "$QT_BASE" == "snap" ]; then
cd ..;
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes theshadowx/qt5:bionic qmake ./src/;
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes theshadowx/qt5:bionic make snap_pack;
sudo chmod 777 notes*.snap;
fi
- if [ "$QT_BASE" == "appimage" ]; then
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:xenial qmake ../src/;
docker run --rm -it --privileged -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:xenial make appimage;
sudo chmod 777 Notes-*.AppImage;
fi
- if [[ "$QT_BASE" == "53" || "$QT_BASE" == "55" || "$QT_BASE" == "56" || "$QT_BASE" == "57" || "$QT_BASE" == "58" ]]; then
qmake ../src;
make deb;
fi
after_success:
- if [[ "$TRAVIS_BRANCH" != "master" && "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ]]; then
export NOTES_VERSION=$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')-git$(git rev-parse --short HEAD);
else
export NOTES_VERSION=$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//');
fi
- if [[ "$QT_BASE" == "xenial" || "$QT_BASE" == "bionic" ]]; then
mv deb/notes*.deb deb/notes_${NOTES_VERSION}_amd64-${QT_BASE}.deb;
curl --upload-file ./deb/notes*.deb https://transfer.sh/notes_${NOTES_VERSION}_amd64-${QT_BASE}.deb -w "\n";
fi
- if [ "$QT_BASE" == "appimage" ]; then
mv Notes-*.AppImage notes_${NOTES_VERSION}_amd64.AppImage;
curl --upload-file ./notes_*.AppImage https://transfer.sh/notes_${NOTES_VERSION}_amd64.AppImage -w "\n";
fi
- if [ "$QT_BASE" == "snap" ]; then
mv notes*.snap notes_${NOTES_VERSION}_amd64.snap;
curl --upload-file ./notes*.snap https://transfer.sh/notes_${NOTES_VERSION}_amd64.snap -w "\n";
fi
- if [[ "$QT_BASE" == "53" || "$QT_BASE" == "55" || "$QT_BASE" == "56" || "$QT_BASE" == "57" || "$QT_BASE" == "58" ]]; then
rm deb/notes*.deb;
fi
notifications:
email: false
deploy:
provider: releases
skip_cleanup: true
draft: true
tag_name: "$TRAVIS_TAG"
api_key:
secure: YLGygfObrwNXKwdJTRVSsmKHoxDThRI7vsnOzlu442HiZcoA+iJXpxEEGFJj2RVeig4//cgZG3nymf/TmSRy3N3AH8o94AC/47glnGx5/z5/dxyNfe9mJol1v5DgadK92wN3HM9wi6ZL+TW8ecEzF4TKteS6JklxUWWVEnq544KnfQdmqUqRkrmJdBHo2OdVpbeJeKH3siWVHHXlfCaW+dlzGb2YwOkcCORcNImzcLjvd36ozMeA4DlH2TbWJysp2i5XxcjuRK9gnwOcNKm2tImTk82z3rwwQ2dy4bTzq1ryigHW0at4/jUzRBrKll5IQ6byY/9DtpRosgKGRKgaqssuxNiOvDzJ0M7qHPhoODMPXKueTChazY3FvrRuJ9sQndhGkreli9JpxCpcTLNOxD1kFgQlrFqmbmZWVHSEjYWXkPtEr1/rbyXFHhV6zfnhxkT24VC4w4wddYsd5zYuvwfYYIRyv5ISYddceIRXJDtli2xgBjlZnuLxU9UmqSwg8m6ETRee3Z6B6k7ojxrK5bOnnVbDHlHpbNmDMacZnyrZWibRgAhcRfaWZBDUYy45vxWjQVD4Z6UPc8XjJo/+axvqnICn2aqTKSguzQBnry5qOvF8n3QptL1yqhlsvLhRg3e17g1U6faS9+k09C/HHSdVBtNR3tWt+jGyxBGQ248=
file:
- *.AppImage
- deb/notes*.deb
- notes*.snap
file_glob: true
on:
repo: nuttyartist/notes
tags: true