[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tracking Release numbers in your builds/deployments...
From: |
Alex Pimenov |
Subject: |
Re: Tracking Release numbers in your builds/deployments... |
Date: |
Thu, 24 May 2007 16:22:21 -0700 (PDT) |
James,
I don't think CVS wold help here because it is more of a build feature rather
than of a VCS.
Our Parabuild will do it for you. It maintains the release version for the
product automatically.
This feature is often used to provide release information that is built-in into
the product. Here
is a code snippet that does it in a fully automated fashion:
Version.java:
class Version {
public static final String RELEASE_VERSION="@release.version@";
}
build.xml:
<project name="ear" default="build">
<property environment="ENV"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="classes.dir" value="${basedir}/temp/classes"/>
<property name="version.staging.dir" value="${basedir}/temp/staging"/>
<!-- Replaces template in Java version with actual release information -->
<target name="version">
<mkdir dir="${version.staging.dir}"/>
<copy file="Version.java" todir="${version.staging.dir}">
<filterset>
<filter token="release.version" value="${ENV.PARABUILD_VERSION}"/>
</filterset>
</copy>
</target>
<!-- Compiles version class and project sources -->
<target name="build" depends="version">
<mkdir dir="${classes.dir}"/>
<javac destdir="${classes.dir}" fork="yes">
<src path="${version.staging.dir}"/>
<src path="${src.dir}"/>
</javac>
</target>
</project>
Here is a link to the feature description. You will have to scroll to the
section "Product Version
Templates And Counters":
http://www.viewtier.com/products/parabuild/feature_details.htm
Thank you.
Alex Pimenov
address@hidden
--- James Depaul <address@hidden> wrote:
>
>
> I'm wondering if some of you would share how you track Release numbers in
> your builds that you deploy - that is, I assume you'd TAG the release
> before deploying, then run the build script to produce the deployment
> artifact (WAR or EAR file) and then deploy that - it would be nice to know
> what release (TAG) is deployed on any of the servers (DEV, TEST, INTEGR,
> PROD) - I wonder how some of you track that and how you determine the code
> release level on each server. Can CvS somehow help with this issue -
>
> thanks in advance -
> James