Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I develop my plugin over on github but when it comes to deployment I have to somehow copy my changes into the Wordpress SVN. Currently I do this manually and copy over each file in each directory individually, but this is time consuming and error prone.

I have seen and tried a few scripts but I think I must be running them wrong as they either error or don't copy over the files correctly.

So my question is has anyone achieved this automatically and if so how did you do it?

Thanks!

share|improve this question
    
While I think this is interesting and useful question it also falls out of scope since it's about interaction of Git and Subversion and there is nothing about it specific to WordPress. I need to think what would be best action here... –  Rarst Jan 25 '12 at 21:20
    
I have started question on meta to discuss this case. –  Rarst Jan 25 '12 at 21:34
    
@Rarst thanks for that, sorry for misplacing the question –  studioromeo Jan 25 '12 at 23:39
add comment

3 Answers

see this tutorial from a co-worker of my team: http://www.farbeyondprogramming.com/2011/09/81-how-to-deploy-a-wordpress-plugin-with-git-svn

but he don`t use the solution, its easier to work separate :(

share|improve this answer
    
Thanks @bueltge. So am I right in thinking he has reverted to the manual method? –  studioromeo Jan 25 '12 at 23:44
4  
For the love of all that is holy, do not follow the instructions on that site. If you suddenly make hundreds of commits to our SVN, I will personally make it my life's goal to find you and beat you with a stick. Or maybe just ban you from WordPress.org. ;) Please only commit the final version, not each and every single one of your changes that you committed to git. We do value your history, but only meaningful history. The problem with git is that people commit loads of useless crap, and we don't need to know all that stuff, generally speaking. –  Otto Jan 26 '12 at 0:19
    
@Otto Lol! No I simply just want to be able to deploy my changes to the SVN repo. Currently do this manually overwriting files in my checked out svn repo but thats tedious & error prone. Do you have any suggestions? –  studioromeo Jan 26 '12 at 0:33
3  
Doing an interactive rebase of your Git changes will let you combine them into a single SVN commit. More info on how to do this is here: stackoverflow.com/questions/158514/… –  Otto Jan 26 '12 at 0:36
    
@Otto I see, seems there is also merge --squash which may be less time consuming. So if I'm right.. workflow is: 1. git merge --squash / rebase -i 2. git svn rebase 3. git svn dcommit 4. git svn tag '1.0' –  studioromeo Jan 26 '12 at 0:41
show 5 more comments

After reading these responses, I pushed one of my plugins to GitHub and wrote a release.sh script. This script gets a partial checkout of my plugin from plugins.svn.wordpress.org using --depth immediates, and updates the files in trunk/ and assets/. This should simplify a periodic push to svn, using the wordpress.org repository to tag releases rather than maintain development history:

./release.sh
svn cp trunk tags/0.6
svn ci "Sending 0.6 from https://github.com/foo/bar to wordpress.org"

A more generic version might work with a wider variety of plugins, handle deleted files, and update svn tags automatically based off git tags.

share|improve this answer
add comment

See How to Publish a WordPress Plugin – Git from @EAMann for a detailed description.

share|improve this answer
    
If you're going to do this sort of thing, please do an interactive rebase and then change all the commits to be squashed, so that you don't make dozens of small commits to the SVN servers. More info on how to do this is here: stackoverflow.com/questions/158514/… –  Otto Jan 26 '12 at 0:33
5  
@Otto While I totally understand your wish to reduce the server load :) I really, really love atomic commits if I have to debug other people’s code. Hm … an automatic link to a public Git repository with a complete commit history could be a useful enhancement for the plugin directory. –  toscho Jan 26 '12 at 1:27
2  
Gotta agree with @Otto about this. WordPress.org's SVN should really be the release repository, not the development repository. –  MikeSchinkel Jan 26 '12 at 13:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.