From b1a49f908472b0c41074cd817d5f62b9045f68b1 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Mon, 18 Jun 2018 09:18:08 -0300 Subject: [PATCH] Switch build to wp dist-archive (fix #128) --- .distignore | 15 +++++++++++++++ .travis.yml | 9 +++++---- 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 .distignore diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..4ef9356 --- /dev/null +++ b/.distignore @@ -0,0 +1,15 @@ +.git +assets/src +bin +node_modules +tests +.editorconfig +.gitattributes +.github +.gitignore +.travis.yml +.tx +phpcs.ruleset.xml +phpunit.xml +webpack.mix.js +yarn.lock diff --git a/.travis.yml b/.travis.yml index 851dc3f..65fada1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,12 +43,13 @@ script: - composer test before_deploy: - export TRAVIS_PROJECT_SLUG="$(basename $TRAVIS_BUILD_DIR)" +- curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar +- chmod +x wp-cli.phar +- sudo mv wp-cli.phar /usr/local/bin/wp +- wp package install wp-cli/dist-archive-command - composer install --no-dev --optimize-autoloader - cd ../ -- zip -9 -ry $TRAVIS_BUILD_DIR/$TRAVIS_PROJECT_SLUG-$TRAVIS_TAG.zip $TRAVIS_PROJECT_SLUG - -x *.git* *assets/\* *node_modules/\* *tests/\* *.editorconfig* *.gitattributes* - *.github* *.gitignore* *.travis.yml* *package-lock.json* *phpcs.xml* *webpack.mix.js* - *yarn.lock* +- wp dist-archive $TRAVIS_PROJECT_SLUG $TRAVIS_BUILD_DIR/$TRAVIS_PROJECT_SLUG-$TRAVIS_TAG.zip - cd $TRAVIS_BUILD_DIR deploy: provider: releases