> On May 9, 2012, at 6:38 AM, Carol Frampton wrote:
> Agreed.  We had quite an elaborate CI setup for Flex.  If needed I can go
> dig up those scripts (most are Python I believe) at some point just to
> make sure we don't end up missing some step.

That would probably be worth doing… and if it's possible… could you also dig up 
the console output for a successful build?

And if there are multiple build styles (smoke, nightly) could you also grab the 
console output for those builds as well?

> The first thing I'd like to see done is to generate a build number which
> is used in build.xml and defaults to 0 for dev builds. 


Here's an ant macrodef for incrementing a build number in Version.properties. 
Version.properties can then be included by the build.xml file.

If env.BUILD_NUMBER is set by jenkins it uses that build number… else it 
generates it's own.

It also defaults to zero if a buildNumber entry does not exist in the 
Version.properties file or the file does not exist.

<macrodef name="increment-build-number">
        <sequential>
                <if>
                        <isset property="env.BUILD_NUMBER" />
                        <then>
                                <propertyfile file="src/Version.properties">
                                        <entry key="buildNumber" type="int" 
value="${env.BUILD_NUMBER}"/>
                                        <entry key="version" 
value="${project.version}"/>
                                </propertyfile>
                        </then>
                        <else>
                                <propertyfile file="src/Version.properties">
                                        <entry key="buildNumber" type="int" 
operation="+" default="0"/>
                                        <entry key="version" 
value="${project.version}"/>
                                </propertyfile>
                        </else>
                </if>
                <property file="src/Version.properties" />
                <echo message="Version: ${project.version} build 
${buildNumber}"/>
        </sequential>
</macrodef>


Reply via email to