Browse Source

Switch build to wp dist-archive (fix #128)

pull/129/head
Ned Zimmerman 7 years ago
parent
commit
b1a49f9084
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 15
      .distignore
  2. 9
      .travis.yml

15
.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

9
.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

Loading…
Cancel
Save