2

I have a local SVN server running on my machine. In it I have a repository containing some default /wp-content stuff, that I use for every project(default plugins, default theme framework, etc). Today I just remembered that instead of having each plugin's files in my repo, I can use svn:externals to fetch the latest files of each plugin.

That's good, but there is one problem - not all plugins' stable tag is /trunk - so I would possibly end-up with a development version(that is in /trunk), instead of the stable version, specified by the stable tag in the readme.txt.

So my question is - is there a way to get the stable tag, whatever it is, using svn:externals(or anything else anyway - when I think about it now, I might be able to run a shell script that will check each of the plugin's stable tag and update the repo accordingly).

Nikola Ivanov Nikolov
  • 5,022
  • 1
  • 26
  • 27

2 Answers2

1

Plugins hosted at WordPress.org need to have a file called readme.txt that's formatted in a particular way. See this: http://wordpress.org/extend/plugins/about/readme.txt

One of the tags near the top of readme.txt is Stable tag:.

When a Wordpress.org blog administrator goes to download a plugin, wordpress.org looks in svn at trunk/readme.txt, grabs the stable tag, then gets the plugin from tags/stable-tag/

So developers releasing updates need to create a new stable tag, then change the readme.txt and check it into the trunk.

I don't know if you can pull off this behavior with svn:externals. But it's worth a try.

O. Jones
  • 103,626
  • 17
  • 118
  • 172
  • I feared that checking the `readme.txt` might be the only way to do this :) If nothing else pops-up, I'll figure-out a shell script that will update my repo with the proper `svn:externals` sources. I might as well ask on the WordPress.org forums to see if anyone else has a clue. – Nikola Ivanov Nikolov Dec 04 '12 at 14:45
0

See https://github.com/nikdow/wordpress_plugins/ for python script to update plugins and themes from Wordpress SVN repository. We use it so that the server root cron gets updates twice a day, and we set file permissions so that the webserver cannot update directories with PHP files. This fixes the most common path to wordpress hacking. We also set PHP so it won't execute anything in the uploads directory.

Nik Dow
  • 584
  • 4
  • 10