INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Embedding the version number in the checked-in file

Embedding the version number in the checked-in file

(OP)
Hello

Visual SourceSafe has a feature where the version number (along with other bits of data such as check-in timestamp, version owner's name, etc) can be embedded in the file being checked in (be it a binary or text file).

This has the huge benefit of being able to very easily tell what the version of a particular file is (when, for example, we're diagnosing a problem at a customer site).

Does ClearCase have something like this? A special set of tags that, when a file is being checked in, ClearCase automatically repalces with info such as the version number? If so, any idea how to set this up and use it? I'm on v2002.05.00.

Thx,
.DaviD.

RE: Embedding the version number in the checked-in file

(OP)
An update to anyone looking for a solution to this -

It looks like Clear Case does not support this by default, but it can be rigged. I found a good article about it here:

http://www.cmcrossroads.com/content/view/6791/174/

It basically involves having Clear Case execute a script when a checkin trigger occurs. The script then has to be coded to search for your keywords and replace them with the info you want (such as branch name, version, etc).

Good luck all!

RE: Embedding the version number in the checked-in file

We do nightly builds in C# using Nant, and we built on the script found here:

http://bloggingabout.net/blogs/joshua/archive/2005/07/26/8675.aspx

The build script checks out the assemblyinfo.cs file from the integration stream (we're also using UCM), increments the build number, and checks it back in.

Chip H.

____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first

RE: Embedding the version number in the checked-in file

(OP)
Thx Chip.

Unfortunately, I dohn't think that would work for us, because we don't create extra versions (i.e. checkins) when the build is made. The engineer's checkin is simply merged back into the main branch and compiled from there.

RE: Embedding the version number in the checked-in file

Under .net, the version number has four parts:

Major
Minor
Build
Release

The Major & Minor stay the same for that product version.  The Build gets incremented every time the product is built.  The Release number gets incremented every time a version is shipped outside the company (whether to beta sites, or full versions).

So we just increment the Build number every night.

Note that this versioning scheme ties heavily into the .net upgrade scenarios.  If you need to issue a bug-fix to a particular major/minor/build version, you'd make the fix, and just change the release number.  The .net runtime then knows that this is a "fix" and will use that one instead of the original.

Chip H.

____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close