I do this with a script that uses awk script to create a file called _vni that can be included. The generated file is obviously not controlled in SVN
Dorel
#!/bin/ksh
svn update
svn status
svn info | awk -f make-vers.awk
makeup vers.awk
This creates an HTML formatted file and uses the background color from the array colsto provide quick differentiation of releases. If you just want the text file to cut out the whole HTML file.
BEGIN{
cols[ci++] = "#3300FF";
cols[ci++] = "#B300FF";
}
/^Revision\:/{rev = $2}
/^Last Changed Author\:/{auth=$4}
/^Last Changed Date\:/{date=$4}
END{
date = strftime("%d-%b-%Y")
col = cols[rev%ci]
vs = "<div id='vni'>\n";
vs = vs "<p style='background-color: "col"'>BuildInfo: [PRODUCTNAME] V2.0 Product ion: Release "
vs = vs (rev)
vs = vs " - " date
vs = vs " ("auth") "
vs = vs "</p>\n</div>"
OF="vni"
print vs >OF;
}
source
share