sudar / wp-plugin-in-github

Collection of shell scripts that I am using to manage and deploy WordPress Plugins from github into svn
http://sudarmuthu.com/blog/developing-wordpress-plugins-in-github
76 stars 20 forks source link

What is this?

Collection of bash scripts that I am using to manage and deploy my WordPress Plugins from GitHub into WordPress official repository svn.

Make sure you have git-svn installed. In Ubuntu you can do sudo apt-get install git-svn

Installation

There are two ways by which you can install the scripts.

cd /tmp
git clone https://github.com/sudar/wp-plugin-in-github
chmod +x ./wp-plugin-in-github/*.sh
mv ./wp-plugin-in-github/*.sh /usr/local/bin/
rm -r ./wp-plugin-in-github

Usage

Cloning existing Plugins from SVN into github

You can use the clone-from-svn-to-git.sh script to clone an existing Plugin from the official WordPress repository SVN into github.

.path/to/clone-from-svn-to-git.sh [-p plugin-name] [-a authors-file] [-u svn-username] [-g github-repo-url]

The following are the different options that you can pass to this script.

Deploying to SVN repo from Github

You can use the deploy-plugin.sh script to deploy your Plugins to SVN repo, from a git repo.

You don't need to have a copy of this script in every repo. You just need to have one copy of this script somewhere and then you can invoke it from multiple Plugin directories using the following options.

./path/to/deploy-plugin.sh [-p plugin-name] [-u svn-username] [-m main-plugin-file]
        [-a assets-dir-name] [-t tmp directory] [-i make-pot-command] [-h history/changelog file]
        [-r] [-b build-command]

The following are the different options that you can pass to this script.

Convert readme file from md to txt format and vice versa

You can use the readme-converter.sh script to convert the readme file between WordPress Plugin format and github markdown format. This script also handles screenshots as well.

The deploy-script.sh script automatically does the conversion by using this script.

./path/to/readme-converter.sh [from-file] [to-file] [format to-wp|from-wp]

The following are the different options that you can pass to this script.

Creating a zip archive of the Plugin

You can use the create-archive.sh script to quickly create a zip archive of the Plugin.

./path/to/create-archive.sh [-p plugin-name] [-o output-dir]

The following are the different options that you can pass to this script.

Update version string of the Plugin

You can use the update-version.sh script to quickly update the version string of all the files of the Plugin.

./path/to/update-version.sh [old_version] [new_version]

The following are the different options that you can pass to this script.

Code Quality Status

The code is pretty stable and I currently use these script for deploying my WordPress Plugins without any major issues. I would however consider the code to be of beta quality status.

Contribution

All contributions (even documentation) are welcome :)

If you would like to contribute to this project, then just fork it in github and send a pull request.

If you are looking for ideas, then you can start with the below TODO list.

TODO

Here is the list of things that I want to implement. Pull requests are welcome :)

License

The source code and the config files are released under "THE BEER-WARE" license.

I would, however, consider it a great courtesy if you could email me and tell me about your project and how this code was used, just for my own continued personal gratification :)

You can also find other ways to make me happy, if you liked this project ;)