You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

 

Purpose 

Tag (i.e., call cvs rtag on) a package with a tag of SCons-acceptable form.  Update the package's SConscript  and release.notes files before tagging.

Syntax

Until someone comes up with a better suggestion, let's assume the command is called stag.   Then it may be invoked

stag -help

or

stag  -cvspath=path-relative-to-cvsroot -notes="text-for-release.notes" (-major | -minor | -patch | -custom=custom-version-string) [-branch=alternate-branch]

Value of -cvspath determines package name: it's the last component of the path. Value of -branch defaults to MAIN.  If -branch is specified and is anything other than MAIN, -custom must be used and its value must follow the form for tags along a branch, namely  dd-dd-dd-aadd where all the d's are digits and the a's are alphabetic characters, e.g. 01-02-00-gr01.  If -custom is specified for a  main branch tag its value must be of the form dd-dd-dd.

What will happen

In case one of -major, -minor or -patch has been specified, stag will generate the new version string by looking up the "highest" tag along the main branch, incrementing the specified field and zeroing fields to the right, if any, and finally prepending with the package name derived from the value of -cvspath. In the case of a custom string, stag merely prepends the package name.

stag will then check out the package into a temp directory (along branch if so specified), update the version string in the package's SConscript file, and add a suitable line to release.notes. A release.notes file which has been modified by stag will have lines with format

    full-version-string date username comment
 

like this: 

GoGui-00-08-07 26-Nov-2008    jrb Support exclude; more informative base inst. display

The complete file looks like this:

** @file release.notes
 * Package GoGui
 * Coordinator: Joanne Bogart
 *
 *                  EOH

 GoGui-00-09-00 05-Dec-2008    jrb Support for supersede directory
 GoGui-00-08-08 01-Dec-2008    jrb Add msg tab for debug info, warnings
    Add edit-file function
 GoGui-00-08-07 26-Nov-2008    jrb Support exclude; more informative base inst. display
 GoGui-00-08-06  25-Nov-2008  jrb Fix for blank-slate use.

If, as in the above case, release.notes has a line containing the toke EOH, stag will insert the new line just below it.  Otherwise the new line will go at the end of the file.

If the package has subpackages, like celestialSources, the new tag will only be applied to the files belonging to the specified package, not to files belonging to children.

Prerequisites

User must have a working cvs client, invoked with the command cvs. stag will try to determine repository from the environment variable CVSROOT; if not set stag will fall back on default value :ext:centaurusa.slac.stanford.edu:/nfs/slac/g/glast/ground/cvs. Similarly it will attempt to determine and protocol from the environment variable CVS_RSH; if not set it will use ssh.

Status 

Executables for RHEL4, RHEL3 and Windows can be found at ftp://ftp-glast.slac.stanford.edu/glast.u05/stag.

  • No labels