How to properly release scripts from SVN with version number
I have a SVN where I am commenting some perl scripts. All the scripts are separate and have different tasks. Currently I a开发者_开发知识库m just using 'svn export
' to release these scripts. Can anyone please suggest me how to properly release the software from SVN and put the version number with each release.
**
EDIT
**
I did some investigation and found a method using set properties. e.g.
svn propset svn:keywords "Id" test/test.txt
The keyword 'Id
' is a compressed combination of the other keywords i.e. Filename, rev number, last modified, and username.
With that I also need to put below in my perl script
$Id$
After commit it will print the information in my script. Just wondering if this is the correct way of releasing the perl scripts or anyone can suggest me better options. Also please advise how to auto set the properties on subversion.
Since the Keyword Substitution you are referencing uses propset, you should be able to use the recursive option (-R) to set it on all of your scripts, provided they are in a common directory tree:
svn propset foo -R some-value .
The above would set the property 'foo' to value 'some-value' recursively on the current directory. In your case, replace 'foo' with 'svn:keywords' and 'some-value' with 'Id'.
Personally, I am not a big fan of keyword substitution, but in the case of Perl scripts I could see that being handy.
As for how to release them? I would Create a Tag as a first step. The rest is really your preference. Having a tag will ensure you have a good reference point for however you choose to release, though.
精彩评论