[wp-hackers] GitHub + plugins.svn.wordpress.org
Simon Dunton - WP Sites
simon at wpsites.co.uk
Tue Jul 3 09:31:19 UTC 2012
Hi Steve,
When I've looked into this in the past the instructions online were based upon a fresh WP repo and Git repo which for an existing plugin isn't much good. I used to develop on a local git repo, pushing my changes to Github and then manually copying files over SVN to WP.org. So I had the full version history over on GIthub and then some form of a commit history over on the WP.org repo. Tagging new versions over SVN seemed to take ages.
Then I found that script. No complicated setup just add the script to your project, change a few settings at the top and then run the script when ever you have a new version of your plugin to deploy. No changes to Git or WP.org SVN, your commit history being unchanged. Just now I don't worry/care about SVN, I work with my plugin using Git and then just execute that script to deploy my plugin to WP.org.
So you can use that script from today without any worries providing you're willing to not have your full commit history over at WP.org from this day forward. Your WP.org commit history would then on just be "uploaded version 1.0", "uploaded version 1.1" etc. Then over on Git you have your history of all changes, it's Git that is your version control software, SVN WP.org is just somewhere you deploy the code. That script also takes care of tagging the release both in SVN and Git, based on the version tag in your plugin header.
"If you have active, separate commit histories in both svn and Github, may God have mercy on your soul." - I may have the wrong end of the stick here but I don't think this applies to you. I think that comment is for a plugin that has developers committing code on SVN and then other developers committing code on Git, so two separate commit histories which I'm sure would be a nightmare. But then again I'm no version control guru, Git does some bloody fancy stuff and I wouldn't be surprised if someone turned around and said to me "do you not know the Git make a brew command: git-brew... try it, a Git robot will come round and make you a coffee"
Simon
On 3 Jul 2012, at 07:24, wp-hackers-request at lists.automattic.com wrote:
> Message: 2
> Date: Mon, 2 Jul 2012 19:28:52 +0100
> From: Steve Taylor <steve at sltaylor.co.uk>
> Subject: Re: [wp-hackers] GitHub + plugins.svn.wordpress.org
> To: wp-hackers at lists.automattic.com
> Message-ID:
> <CAGEuVU1s=M4yKu4nW9jFyc9-8S4Xv-aBGFGhuQMzBhHkEQeX4g at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Thanks Simon, but I'm not that far yet! I'm having problems with the
> fact that I already have a functioning GitHub repo and wordpress.org
> SVN repo for my plugins.
> I don't mind losing my commit history on GitHub if absolutely
> necessary (I imagine losing the history on wordpress.org is out of the
> question). Just not sure how to address the issue.
More information about the wp-hackers
mailing list