Have you ever found a tool that made things so much easier you had to tell as many people about it as soon as possible? Yeah, that just happened to me.

A little back story:

I wrote a pretty neat WordPress plugin and had it hosted on GitHub. Basically, it takes an iTunes App Store application ID and fetches all the data about it and displays it on a WordPress site (while caching it for you in the WordPress database).

So I wanted to release it to the world using the WordPress plugin directory... the go-to location for finding plugins. If it didn't live there, it basically had zero chance of getting any usage whatsoever. Nobody goes searching GitHub for WordPress plugins.

There was one problem...

WordPress uses SVN as the required source code management tool for publishing plugins. You clone check out the repository, make your changes, commit them and then tag the new version and the WordPress plugin directory detects the change and within a few minutes, your updated plugin is released to the world and every site that is using your plugin gets a little message at the top of the admin bar asking them to update their version of the plugin.

Except I haven't used SVN in about 4 years. Basically the whole world has moved to GIT. There's been a exodus from SVN, CVS, Perforce, Mercurial, etc. because of GIT's ease of use and distributed model.

GIT to the rescue

Recent versions of GIT have really focused on integrating SVN as much as possible. The git-svn command is powerful enough to clone an entire SVN repository and allow you to work on it like it's a GIT repository, then commit your history back to the SVN server, and the SVN server is none the wiser.

So I knew there had to be an easy and/or automated way to publish and then submit subsequent updates to my application.

tl;dr bro

I know, I know...

Which brings me to my point:

With a little Google-fu, I found Brent Shepherd's blog post about his Automated WordPress Plugin Deployment script. Basically, it's a bash script that you download and put into every plugin repos and change a few variables. When you're don'e working on some features, just run ./deploy.sh and it automatically, checks out the SVN plugin, updates it with all your changes, making sure to ignore your GitHub "README.md" and the deploy script itself. Then it tags the new version and commits everything back to the WordPress server. It even aborts if it detects your readme.txt file stable version number doesn't match your plugin's declared version.

Thanks, Brent, for the fantastic deploy script. It worked flawlessly on the first try and my new plugin has been published.

Octocat to the rescue.

Github