I'm looking ways to manage $VERSION numbers
automatically. I used to use the CVS Revision keyword
to fill the version. As I now use svn and svk,
a new trick is required.
The most useful thing we've found so far is an
E::MM::FAQ example
although there's probably more out there
(googling subversion, perl and version is a mess).
This quote explains some issues with svn and svk:
In SVN, $Revision$ should be the same for every file in the project so they would all have the same $VERSION. CVS and RCS have a different $Revision$ per file so each file will have a differnt $VERSION. Distributed version control systems, such as SVK, may have a different $Revision$ based on who checks out the file leading to a different $VERSION on each machine! Finally, some distributed version control systems, such as darcs, have no concept of revision number at all.
The CVS incantation I used to use was:
# CVS exmample
$VERSION = sprintf "%d.%03d", q$Revision: 1.1 $ =~ /(\d+)/g;
Subversion has keyword substitution but, as mentioned above, it's
handled differently to cvs.
What tips do you have a automatically managing version?
What about using $Date$ for versions? eg. 2008.02_18
Is the PBP "use version; qv()" actually a BP?
How are branches best handled?
Are there other ways to update versions, not using the
source control system?
Is the attempt to do this automatically flawed?
Thanks,
Brad
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.