Just a little confused by the various SVN documentation. When you release a new version of a plugin do you:
1. Upload it to the trunk folder to replace the previous version AND to a folder of the version number under Tags, or
2. Just upload it to anew folder of the version number under Tags and just update the version number in the trunk readme.txt file?
Thanks in advance
If you’re not keeping old versions around for people, then simply updating trunk will be enough. This is the usual case for extremely simple plugins. In this case, you’d want “Stable Tag: trunk” in the readme.txt file. The version number would need to be raised to make it push a new version out for updating.
If you are doing proper versioning and keeping old versions around, then doing a release is a two step process.
1. Update all the version numbers in the trunk to reflect the new version. This includes the Stable Tag: to point at the new version.
2. Copy the trunk to tags/version.number to tag the version.
Ideally, you still want to keep a complete copy of the plugin under the trunk directory. Usually this will be a working copy, where you make your changes until you’re ready to do a release. This is assumed to be the “beta” version, basically. If somebody uses the Plugin Beta Tester plugin, then it will let them update to whatever is in your trunk.
Thanks Otto but still a bit confused.
In step 1 above are you saying leave the original version in the truck but update the Stable Tag to the new version?
This is what I’ve done and it seems to have worked but I’m not sure I’ve done it correctly.
First version uploaded was 1.0 and I uploaded this to both /trunk and to /tags/1.0.
Updated version is 1.0.1 so uploaded this to /tags/1.0.1 and changed the Stable tag in /trunk/readme.txt to Stable tag: 1.0.1.
Do I need to upload v1.0.1 to the trunk too or is it ok as it is?
Basically, whenever I do a release of my main plugin, Ndizi Project Management, what I do is this:
/trunk/files. Change the plugin version to say … 0.9.5.9 … Then, I update the
readme.txtto say Stable Tag: 0.9.5.9 — then, from
svn ci -m "Updating trunk to version 0.9.5.9"
and it’ll update all my files in
readme.txt— then, from the svn root directory (not trunk, root) at
svn cp trunk tags/0.9.5.9
svn ci -m "Copying trunk over to new tag for version 0.9.5.9"
and then it copies all the files over and makes the tag directory.
Thanks George. Actually this whole SVN thing is new to me and stretches my technical abilities. I’ve been using TortoisseSVN so have avoided all the command line instructions.
I think what your saying is that you upload the new version to the trunk, update the version number in the trunk readme.txt and then copy the trunk to tags/[new version]? Is that correct?
If you make any changes to the readme.txt file is it ok to replace the truck readme.txt or do youhave to keep the original one and just change the version number? I ask because I replaced the trunk readme.txt file and it screwed up what was displayed but when I changed it to the original with just the version displayed it then displayed the new readme.txt file. I therefore assume it muct be displaying the content of the readme.txt file from the tags folder?
My head hurts!
Thanks for your help guys.
Oh, no worries. SVN is a beast to get used to, but it helped me learn it to actually do it from my BASH prompt. But then, I use Linux for my everyday computing needs, and not everybody can do that.
I think you’ve got it right, but yes, you can edit readme.txt whenever you need.
For reference, feel free to peruse the SVN repo for my ‘Ndizi Project Management‘ plugin here: http://plugins.svn.wordpress.org/ndizi-project-management/
Actually seeing several tags and things in place may help you understand it.
Okay, here’s an easy way to think of it.
1. Trunk should be a complete copy of the latest code. It is basically your working directory. When you check in changes, you check them into trunk. Only thing special about trunk is the “Stable Tag”, which points to the latest RELEASED version of the code.
2. When you want to do a “release”, you change the Stable Tag in trunk to point at the new release version, then make a directory in tags with that version number. Into this directory, you’re going to copy all of the latest trunk.
What gets released will be what’s in the tags directory. But yes, you still need to have the latest code in trunk.
When I make changes, I make them to trunk. When it comes time to release those changes, I update the stable tag and copy trunk to the new tag directory.
Note: When you’re doing versioning, then the only thing that matters in the trunk’s readme.txt is the Stable Tag. Everything else will be read from the tagged version’s readme.txt. But you still want to have the complete readme.txt in trunk. Trunk should be a complete copy of your “working” code, because sometimes other people want to run the latest code instead of the latest “released” code. Having this in trunk adheres to convention and allows people to know what’s new and what you’re working on and so forth.
BTW, after you tag a version, you can’t really change it properly. Tags are not working copies. Think of them as “snapshots” of your code at some point in time. Changes to tagged versions very likely won’t be read or rereleased after the initial creation, so changing them is pointless. If you need to make changes, you change trunk and then release the changes as a new version.
- The topic ‘Upload new version to tags and/or trunk?’ is closed to new replies.