Skip to content

Commit 60e0c5a

Browse files
author
Oliver Müller
committed
Changed .travis.yml and added release folder, a release script and a file excludelist text file
1 parent 2f7d483 commit 60e0c5a

File tree

3 files changed

+53
-14
lines changed

3 files changed

+53
-14
lines changed

.travis.yml

+36-14
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,49 @@ dist: precise
22
sudo: false
33
language: php
44

5-
matrix:
6-
include:
7-
- php: 5.3
8-
- php: 5.4
9-
- php: 5.5
10-
- php: 5.6
11-
env: WITH_CODESTYLE_CHECK=true
12-
- php: 7.0
13-
- php: 7.1
14-
155
before_script:
166
- phpenv config-rm xdebug.ini || return 0
177
- composer install
18-
- curl -L http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -o php-cs-fixer
19-
- chmod a+x php-cs-fixer
208

219
script:
22-
- if [[ "$WITH_CODESTYLE_CHECK" == "true" ]]; then ./php-cs-fixer fix --config=.php-cs.dist
23-
--cache-file=.php-cs.cache --diff --dry-run --verbose .; fi
2410
- vendor/bin/phpunit
2511

12+
jobs:
13+
include:
14+
- stage: Unit Test + Code Style Fixing
15+
php: 5.3
16+
- stage: Unit Test + Code Style Fixing
17+
php: 5.4
18+
- stage: Unit Test + Code Style Fixing
19+
php: 5.5
20+
- stage: Unit Test + Code Style Fixing
21+
php: 7.0
22+
- stage: Unit Test + Code Style Fixing
23+
php: 7.1
24+
- stage: Unit Test + Code Style Fixing
25+
php: 5.6
26+
script:
27+
- curl -L http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -o php-cs-fixer
28+
- chmod a+x php-cs-fixer
29+
- git checkout $TRAVIS_BRANCH
30+
- ./php-cs-fixer fix --config=.php-cs.dist --cache-file=.php-cs.cache --diff --dry-run
31+
--verbose .
32+
- rm php-cs-fixer
33+
- vendor/bin/phpunit
34+
- stage: deploy
35+
php: 5.6
36+
before_script: skip
37+
script:
38+
- if [[ "$TRAVIS_TAG" ]]; then ./release/build_release_package.sh ; fi
39+
deploy:
40+
provider: releases
41+
api_key:
42+
secure: o0fajv0gXUPWRk1iNmoDnFJpyK9LYSUTqe1H+oAcsiOWeF7K0oIMlWEy2m7K3Vf3lhjDfqNZk2OtlQ58+N4cb+KpsfOuVcvBDWcG3GU94ASnbytWH+TnQzcUm5sF9MXvDQGKzseXArIIKTs0+yBkm/lTwuEP4hWhqk6+zuWax+j/uh7El3Blvn+6n4grwu5GItiLgFXGbaYYwEwb73zTJZ5RviMnMgCeqsDM0SYTSLa6nDCNe8PESADJnPwL/X74hqequwF7Sga6GbYhP0ys1avLsirqb8HMFxBz8JFB34XC2xmQABa+DfHJhtCrqu6VsFVvT5yfKfzgmqIeyDyhWAQHMs6kjXoiTt+Lwz+j88U/ktJ5UduJTMyuoLsQ742yIWxHEjmw/IqtiJmHUn6BL0sl8gxqGgLcQWfDmd155/jwT1PhbNJQBiDIlBNHhlDTyLO44NYvWECeWWX9DBqf4UMOdL2B7mzqtvRo0eMmScmm2pKGdicfr3fhqUHw418ZVjcsci/y18apaQCd9L1qN9sEBKRsMMuerEsJdfwipZM1P0dWhevLkHSXjGFcrY5x1tA/EyMQoz5eVItNsBc29fJgcYcPTSbjwH02mLHFtIvnGnRYqJy4qvGJp3RONkfpvyefjpQFocl5P4rTgq/rNod9PJv1WMVv0BSvy0A+Y+8=
43+
file: shopgate-cart-integration-sdk.zip
44+
skip_cleanup: true
45+
on:
46+
tags: true
47+
2648
notifications:
2749
slack:
2850
rooms:

release/build_release_package.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
mkdir release/shopgate-cart-integration-sdk
4+
rm-rf vendor
5+
composer install -vvv --no-dev
6+
rsync -av --exclude-from './release/exclude-filelist.txt' ./ release/shopgate-cart-integration-sdk
7+
cd release
8+
zip -r ../shopgate-cart-integration-sdk.zip shopgate-cart-integration-sdk

release/exclude-filelist.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.git/
2+
.gitignore
3+
.travis.yml
4+
.php-cs.cache
5+
.php-cs.dist
6+
.travis.yml
7+
build_release_package.sh
8+
shopgate-cart-integration-sdk/
9+
release/

0 commit comments

Comments
 (0)