-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (57 loc) · 2.3 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: php
env:
- fakeRoot=/tmp/mmp
php:
- 5.3
- 5.4
- 5.5
- 5.6
# - hhvm
services:
- mysql
before_script:
- composer install --no-interaction
- cp tests/config.ini.travis tests/config.ini
script:
- mkdir -p build/logs
- phpunit
after_script:
- php vendor/bin/coveralls -v
after_success:
- gem install package_cloud
- apt-get install alien
- install -d $fakeRoot
- install -d $fakeRoot/DEBIAN/
- install -d $fakeRoot/usr/share/doc/mmp/
- install -d $fakeRoot/usr/share/mmp/lib/
- install -d $fakeRoot/usr/bin/
- cp deploy/DEBIAN/copyright $fakeRoot/usr/share/doc/mmp/
- cp lib/* $fakeRoot/usr/share/mmp/lib/
- cp *.php $fakeRoot/usr/share/mmp/
- ln -s /usr/share/mmp/migration.php $fakeRoot/usr/bin/mmp
- sed -i "s|require_once __DIR__|require_once '/usr/bin/mmp/'|" $fakeRoot/usr/share/mmp/migration.php
- gzip -c -9 deploy/DEBIAN/changelog > $fakeRoot/usr/share/doc/mmp/changelog.Debian.gz
- cp deploy/DEBIAN/* $fakeRoot/DEBIAN/
- sed -i "s|#build|$TRAVIS_BUILD_NUMBER|" $fakeRoot/DEBIAN/control
- sed -i "s|#family|squeeze|" $fakeRoot/DEBIAN/control
- fakeroot dpkg-deb --build $fakeRoot
- lintian --allow-root -L ">=important" /tmp/mmp.deb
- cp /tmp/mmp.deb mmp~squeeze.deb
- if [ $PACKAGECLOUD_REPO ] package_cloud push $PACKAGECLOUD_REPO/debian/squeeze mmp~squeeze.deb fi
- cp deploy/DEBIAN/* $fakeRoot/DEBIAN/
- sed -i "s|#build|$TRAVIS_BUILD_NUMBER|" $fakeRoot/DEBIAN/control
- sed -i "s|#family|wheezy|" $fakeRoot/DEBIAN/control
- fakeroot dpkg-deb --build $fakeRoot
- lintian --allow-root -L ">=important" /tmp/mmp.deb
- cp /tmp/mmp.deb mmp~wheezy.deb
- if [ $PACKAGECLOUD_REPO ] package_cloud push $PACKAGECLOUD_REPO/debian/wheezy mmp~wheezy.deb fi
- cp deploy/DEBIAN/* $fakeRoot/DEBIAN/
- sed -i "s|#build|$TRAVIS_BUILD_NUMBER|" $fakeRoot/DEBIAN/control
- sed -i "s|#family|jessie|" $fakeRoot/DEBIAN/control
- fakeroot dpkg-deb --build $fakeRoot
- lintian --allow-root -L ">=important" /tmp/mmp.deb
- cp /tmp/mmp.deb mmp~jessie.deb
- if [ $PACKAGECLOUD_REPO ] package_cloud push $PACKAGECLOUD_REPO/debian/jessie mmp~jessie.deb fi
- alien --to-rpm --scripts mmp~jessie.deb
- cp mmp~jessie.rpm mmp-$TRAVIS_BUILD_NUMBER.rpm
- if [ $PACKAGECLOUD_REPO ] package_cloud push $PACKAGECLOUD_REPO/el/7 mmp-$TRAVIS_BUILD_NUMBER.rpm fi