GithubHelp home page GithubHelp logo

thedigitaloctopus / travis2wpplugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from miya0001/travis2wpplugin

0.0 0.0 0.0 16 KB

Automated deploy to WordPress plugin repository from Travis CI

Shell 100.00%

travis2wpplugin's Introduction

Automated deploy to wordpress.org plugin repository from Travis CI

How to setup

Please add following lines into .travis.yml.

Deployment should be executed only after_success.

after_success: curl -L https://raw.githubusercontent.com/miya0001/travis2wpplugin/master/deploy.sh | bash

This script will run when WP_PULUGIN_DEPLOY is true.

matrix:
  include:
    - php: 5.3
      env: WP_VERSION=latest WP_MULTISITE=0 WP_PULUGIN_DEPLOY=1

Finally, please add environments variables like following in global section.

env:
  global:
    - SVN_REPO: https://plugins.svn.wordpress.org/<plugin-slug>/
    - secure: "xxxxxxxx"

You can get secure value like following.

travis encrypt SVN_USER=<your-account> SVN_PASS=<your-password>

http://docs.travis-ci.com/user/encryption-keys/

.svnignore

Example of .svnignore is following.

https://github.com/miya0001/wp-svnignore

Add your .svnignore like following projects

https://github.com/miya0001/simple-map

This script runs svn propset -R automatically when there is a .svnignore.

bin/build.sh

If you are using gulp, composer or so, please place the bin/build.sh.

bin/build.sh will be executed automatically.

How to commit

When you tag like following, then it will run commit to plugin's repository on wordpress.org.

$ git tag 1.0.0
$ git push origin 1.0.0

Tag and plugin's version need to be same.

Integration Checklist

You can use following checklist to integrate this project in your plugin.

  • Add after_success: curl -L https://raw.githubusercontent.com/miya0001/travis2wpplugin/master/deploy.sh | bash into .travis.yml like this.
  • Define the WP_PULUGIN_DEPLOY=1 in the .travis.yml like this.
  • Run travis encrypt SVN_USER=<your-account> SVN_PASS=<your-password> and paste the output into .travis.yml like this.
  • Place the .distignore that are list of files to exclude to commit SVN. It is an example.
  • If you need to run npm install or composer install or so, place the build.sh that will be executed automatically. This is an example.

Finnaly, you can release your plugin like following.

$ git tag 1.0.0
$ git push origin 1.0.0

Example project

We are using this project in following plugins.

Please check logs of Travis CI.

travis2wpplugin's People

Contributors

fumikito avatar miya0001 avatar torounit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.