forked from bmlt-enabled/bread
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (67 loc) · 4.2 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
language: php
php:
- '7.1'
env:
global:
- ZIP_FILENAME=bread-build${TRAVIS_BUILD_NUMBER}-${TRAVIS_COMMIT}.zip
- S3_BUCKET=archives.bmlt.app
- S3_KEY=bread
jobs:
include:
- stage: lint
install:
- composer install
script:
- find . -name "*.php" ! -path '*/vendor/*' -print0 | xargs -0 -n1 -P8 php -l
- ./simplify-mpdf.sh
#- mpdf/vendor/squizlabs/php_codesniffer/bin/phpcs --warning-severity=6 --standard=PSR2 --ignore=vendor --extensions=php --report=summary ./
- stage: zip file
env:
- BUILD_DIR=build
- DIST_DIR_S3=dist/s3
- DIST_DIR_GITHUB=dist/github
- GITHUB_RELEASE_FILENAME=bread.zip
- PLUGIN="bread"
- MAINFILE="bmlt-meeting-list.php"
install:
- composer install --no-dev
script:
- find ./ -type d | xargs chmod 755
- find ./ -name '*.php' | xargs chmod 644
- ./simplify-mpdf.sh
- zip -r $ZIP_FILENAME ./ -x "*.git*" -x "*.editorconfig*" -x "*.travis.yml*" -x "*assets*" -x "composer.*" && mkdir $BUILD_DIR && mv $ZIP_FILENAME $BUILD_DIR/
before_deploy:
- mkdir -p $DIST_DIR_S3 && cp $BUILD_DIR/$ZIP_FILENAME $DIST_DIR_S3/$ZIP_FILENAME
- mkdir -p $DIST_DIR_GITHUB && cp $BUILD_DIR/$ZIP_FILENAME $DIST_DIR_GITHUB/$GITHUB_RELEASE_FILENAME
- curl -LO https://raw.githubusercontent.com/bmlt-enabled/bmlt-wordpress-deploy/master/deploy-wordpress.sh
- chmod +x deploy-wordpress.sh
deploy:
- provider: s3
access_key_id: AKIAI7JHYFA6DI3WYP5A
secret_access_key:
secure: fMcpeB4ECFIBuwKQl3Xa5vl/iuy3amrGPoPC3zvUnheWfrdV/0y7bc0jTybXw1RMQ38vsz8WrFZQgt3stMCpwA6aEE8Sq60iahDmhKCTpyb13XZEQrZefZQutM3C7zR0Yo3TtjN1URrkzKdau+hoMEx59Xuv7FjV8NwgKHD5Mj3kDDBHjeEI+sRAXwUKQs7jMdP9LXjU3brK+c9u8cuCOepc1dlTkRAV4WYbkSILy55yewRG4gS8hYQ8W3CzkNCIMQebpb1WBhVpwXxcwl1G8xvTp6go/9qesyL8YA1nHM54oeTTknpuxh8l2ydBmtgGb7BCyYVq/g6Eqzx5/S0sGpzQZ3CG4a55BAP/w4zvMtipWshfS+N72G26ils/0xC/xozO1im6dakaGQYBEjo/OWr0tiwQYZ6U5JlSp7jd0x0Gtpyvwysmsti4sIenK3RO7zqUFwBQbt4KMva+VJV9foTaqUKFEkxqN9l4hW+wOR9rfj4nAkOTIH700uaa5QwziISL7O/0jLPuKW7+055vSEbeAgJWdP86m68y0AV0Ijt993YvU8YV6bzJ7qEh6UE0z2FZorRTOqHB31cOv49tKZJOUxtiqx984cGOZTRdIBvxr5sBN1mT9pY0Wx9C46y+r548SVJ04R/HytB+ZfJLowxpMJ4RNGW0wX8Hd64AKVo=
bucket: "$S3_BUCKET"
local_dir: "$DIST_DIR_S3"
upload-dir: "$S3_KEY"
skip_cleanup: true
on:
all_branches: true
- provider: releases
api_key:
secure: e8x7MjdhEyq929NMebqhDGbCG64OUzIWiBeNb+ZF0xeGjghjljOUEaLm+2bdDZyMLyho94zayp1rq0gfXUz8vBkLgSYOaCuJhsFRoXhWPcvbGcXe3URpDSfUrx8QE46UtATFdBdfT2KFjeyH95g/w/1WFjSqOfQtAyFV+bs4YzOyaXRjo4SQxupfM1+Is/A3FTskXXW2y5M6raIViuz3eZGkJjVIkIV5sCPRloro80q+GonraSLtr2aBElR8CZaNESPJpcLcA467BW3Pf8p5Mm6jYO4rSTFcUN2s/O8S+C8rrKKw9UYL0mFAratrGK/+GXZbbmgZD4Ujw24xOre/x240NHMTF4TpXrLSLmRjycC3IPyKt0wCb//rKl0YoTMo1390+xWnvM3V08L2CXwhFqGH8j0DgKam1+KhtM0hHFT8NNC9CltyKXdGEzo367N+i9JTtoJbwsfXxNGlF7uKGHu9u7WQQ0oE3ARF5SyFE/6F7e5z5hyItfpitHirMSDOjWkVbbb0ukhFhFkLRddmrFmRW0fu+beAcIlmQtTkPIoBUt+rvcr4Vb51uK5VqcnvAqYtvVrMGRmwTOvdqI0tHmSFw3lOcyf0c4BiplysYHSmQz2pBy+eQmPga1GW5xJt43bkz5B35AEMkq6kVRrIar5YiHBccQZff/T0dMxFmjM=
file: "$DIST_DIR_GITHUB/$GITHUB_RELEASE_FILENAME"
skip_cleanup: true
name: "$TRAVIS_TAG"
on:
tags: true
- provider: script
script: ./deploy-wordpress.sh
skip_cleanup: true
on:
tags: true
notifications:
slack:
rooms:
- secure: bmoIugz9sorNakDw7LnfC3iB7a4CnhuZeZBAVxefSoqipbZAGLoA86pSaDwSK3kNsCRAUXyHJ0pBxxJuCO5jrQKhl9TNBFQQ60KPvn3LQj9OXXTSHp4qoqBytipQGyjeqySu4fJt8Lc0u8FQ0qinxn21qF7K7c54aygVKQd+nxf/+9rVzSOJIY+c6UEBb9FwKfHl9cOJy8nTHYPNl0ZbQaYVS1gvyOV2jzrlurOXb0t2xYs2W9EOAjUd2E4ZVaD8EEyRZ9zcvy8ne41qZGBLMJjHZo6TdN4x0AdEYiITst5fKj+YILNCaVQMyURu5h65RPVXyjZ/eIOUixSt1EOpMTxWcRiDn3H7B2F7eEUIXyo/c5x1AEWEQFLGK+/PEqWx/zaBG0rJJdzVbLaqet2kg5piy+f84EBCZiXm7CZIYPMSjLJo9AJDcY9iSRgvpRnkSagHZAgMILNut53aNPd8i3FoOeycPwux/KDQpSz0uIpn4xu26VY0bzxJ8N27VugUhmNhLCN05Hgw8GoDjEoh4EgPPsdNVzXT4mzpjx2GfhRZOm/78LUSDB/w3oIAEPzRFfhberBAo0l2w9T5+Ynbw9yyquYgNUOW/nMhbwqOPbWqndHa8Xume0DXp2COHEqoSZx4gDIIRRKjKdsrFjjasWB5K7IQXQfBoiGAL7EscNA=
on_success: change
email: false