-
Add
wpsh/wpsh
as a developer dependency to your project:$ npm install --save-dev wpsh/wpsh
Run
npm init
if your project is missing thepackage.json
file. -
Add
wpsh
to thescripts
section of thepackage.json
file:"scripts": { "wpsh": "wpsh" }
-
Use
npm run wpsh
to run the WP Shuttle script.
To run it as wpsh
instead of npm run wpsh
you should add path to the local npm bin
folder to the $PATH
environment variable by appending the following to ~/.bashrc
or ~/.zshrc
:
export PATH="./node_modules/.bin:$PATH"
and restart the shell to trigger the change.
-
Update the Travis CI config
.travis.yml
to deploy your plugin when committing tomaster
and tagging a release:deploy: - provider: script script: npm run wpsh $TRAVIS_TAG on: tags: true - provider: script script: npm run wpsh trunk on: branch: master
-
Specify the following environment variables in the Travis CI repository settings for deploying to the WordPress plugin SVN repository:
WP_ORG_SLUG
WP_ORG_USERNAME
WP_ORG_PASSWORD
-
Use
.svnignore
to exclude files and folders from the deployment.