This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
32 lines (30 loc) · 2.03 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
language: php
php:
- '7.0'
before_script:
- rm -f -r $TRAVIS_BUILD_DIR/target
script:
- BUILD_NUMBER="$(date +'%Y').$(date +'%m').$TRAVIS_BUILD_NUMBER"
- echo "BUILD_NUMBER=$BUILD_NUMBER"
- mkdir -p $TRAVIS_BUILD_DIR/target/favpress
- cp -r $TRAVIS_BUILD_DIR/src/wordpress-artifact/* $TRAVIS_BUILD_DIR/target/favpress/
- cp -r $TRAVIS_BUILD_DIR/src/release-full-package-resources/updater.json $TRAVIS_BUILD_DIR/target/updater.json
- sed -i -- "s/__PRODUCT_VERSION__/$BUILD_NUMBER/g" $TRAVIS_BUILD_DIR/target/favpress/favpress.php
- sed -i -- "s/__PRODUCT_VERSION__/$BUILD_NUMBER/g" $TRAVIS_BUILD_DIR/target/updater.json
- sed -i -- "s/__CURRENT_BRANCH__/$TRAVIS_BRANCH/g" $TRAVIS_BUILD_DIR/target/updater.json
# Compile SCSS files
# We upload the files for now. Better solution needed.
# Package the plugin
- jar -cMf $TRAVIS_BUILD_DIR/target/favpress.zip -C $TRAVIS_BUILD_DIR/target favpress
- ls -al $TRAVIS_BUILD_DIR/target/
after_success:
- curl --ftp-create-dirs -T $TRAVIS_BUILD_DIR/target/favpress.zip -u $FTP_USER:$FTP_PASSWORD ftp://moewe.io/$TRAVIS_BRANCH/favpress.zip
- curl --ftp-create-dirs -T $TRAVIS_BUILD_DIR/target/updater.json -u $FTP_USER:$FTP_PASSWORD ftp://moewe.io/$TRAVIS_BRANCH/updater.json
deploy:
provider: releases
api_key:
secure: LTODsjOS3SOqFZNnfnWxVano0ejfzd27EwswSEtb8aBXo50bvK2TeKx8pobzpDNYNAsVBfLD/7eRmKiVLGSiuQraLjdqiBHC4NDgbal3g3H4WnH54+OdcTi2jT9QW0RXSgiDgn5q4ZVbaZJebwO1IYWneB/PqfFxTsndasjucKAK3t7+8gvG2roCyKqPPtlsCKSK2+23m26eT4zdGvXVPMDHhPQ489l09LJTXRfrjXAB1E7sVvLdhqw38WdDPe3yxxSBqpaPpxExRPpPsdP53+HRsHxIjj/AxF/YiTo8v53RZ2nZ55in5YK4VdsF6NnvUizLl3aNyz1knhWgm8bJ2dRNufT4vR1KmHQpT/7yaKH8VLQhNmdxFAUNYsn9k9uHxmRF7jFhSII4hQoeBgHlcqthaC8LKaU7hl8l4I7u22WhmpZra83xwxe3kMUUKtd/2tJk57PE4xzts1ClzTOCI+S3f056rz4tDSsUBB5+J5FUhfioAeTzBmw19foOlpM3X+O4+z86EU7jGpBvAEfx05plRI9NjyBG+IPn0Y3pwKYxxb/9LFI3pu7IdZmfvW0YQVDkdl0GrUB9WJOgZGKMokKr1/JICCkxWmBcUoTVixiIpo6rwZ5N8WjOtz/mfxiZ6XvJ+DQzysgdOUYRkO4YSuJmxLBMo+mbbEvLDXhovjA=
file: $TRAVIS_BUILD_DIR/target/favpress.zip
skip_cleanup: true
on:
tags: true