11

If I am pushing a new version (v0.2) of my plugin (v0.1) on the repo, what does I do with the stable tag in readme file? Change it to v0.2?

What should come here? Clarifications please :)

3 Answers 3

14

Yes. You need to:

  • Change stable tag to 0.2
  • Commit (or copy/branch) new version to /tags/0.2
  • Don't forget to update version to 0.2 in plugin's header
6
  • I think it's recommended that the last step should be to update trunk/readme.txt to reflect the new stable tag. Otherwise you can get a possible race condition where the wp.org servers think there's a new tag to bundle, but it doesn't actually exist yet, because you haven't done the svn cp yet. Apr 16, 2011 at 21:20
  • @Dougal Campbell I think refresh interval of repository is 15 minutes so order isn't particularly important and I didn't meant my answer to enforce any order... I will edit to change to unordered list.
    – Rarst
    Apr 16, 2011 at 21:25
  • What's up with the order? Shouldn't I just commit everything to trunk and then copy over to a sub-directory in Tags?
    – Ashfame
    Apr 16, 2011 at 21:30
  • @Ashfame yes, that will work. I think what Dougal wanted to describe is that it can glitch if repository refresh happens after you change trunk but before you create target tag. Personally I think that is unlikely.
    – Rarst
    Apr 16, 2011 at 21:33
  • @Rarst Even if that glitch occurs, it will be resolved in next refresh anyway, right?
    – Ashfame
    Apr 16, 2011 at 21:37
3

I'd recommend this order of operations:

  1. Update your plugin's .php file in trunk to reflect the new version, and commit
  2. svn cp trunk tags/0.2
  3. Edit tags/0.2/readme.txt and trunk/readme.txt to reflect new stable tag
  4. svn commit -m "Tagging ver 0.2"
3

The Stable tag indicates the current version in the svn repository which you want users to use/update. In most cases simply set it to 'trunk', as explained in this article on Smashing Magazine, How To Improve Your WordPress Plugin's Readme.txt

Stable tag. The stable tag tells WordPress which version of the plugin should appear in the directory. This should be in numeric format, which is much easier for WordPress to deal with. Aim for numbers like 1.5, 0.5 or whatever version you’re at. If your stable version is in the trunk in Subversion, then you can specify “trunk,” but that is the only time you should use words instead of numbers.

Furthermore, from the actual WordPress documentation,

WordPress.org’s Plugin Directory works based on the information found in the field Stable Tag in the readme. When WordPress.org parses the readme.txt, the very first thing it does is to look at the readme.txt in the /trunk directory, where it reads the “Stable Tag” line. If the Stable Tag is missing, or is set to “trunk”, then the version of the plugin in /trunk is considered to be the stable version. If the Stable Tag is set to anything else, then it will go and look in /tags/ for the referenced version. So a Stable Tag of “1.2.3” will make it look for /tags/1.2.3/.

If you use the svn as your development repository then it makes sense to use an actual version number in the Stable tag. for example 1.5.2 while you have v2.0.0 in the repository on which you are currently working but it still under development.

Other reason to use a version number

If your plugin has translations and makes use of translated strings with localised functions, then you may want to consider using a stable version for the tag, as language files are loaded for that version. So if you update your plugin and add many new localised strings, then it makes sense to set your stable tag to the previous version to give time for translators to complete the translation for the new version. Once the translations are ready, you can switch the stable tag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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