pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger Whitcomb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIVOT-1035) Add a real build number to the Pivot (internal) version
Date Wed, 08 Aug 2018 20:03:00 GMT

    [ https://issues.apache.org/jira/browse/PIVOT-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16573779#comment-16573779
] 

Roger Whitcomb commented on PIVOT-1035:
---------------------------------------

What about using the "Last Changed Rev" from "svn" as the build number?  This makes a bit
more sense (and is what [~smartini] suggested from the blog earlier)?  That rev can be traced
to specific dates, files, issues, etc.

{{Index: build.xml}}
{{===================================================================}}
{{--- build.xml (revision 1837669)}}
{{+++ build.xml (working copy)}}
{{@@ -66,10 +66,23 @@}}
{{ <!-- Dynamic properties -->}}
{{ <property file="build.properties"/>}}
{{ <property name="release" value="apache-${ant.project.name}-${version}"/>}}
{{+ <exec executable="svn" dir="." output="svnlog">}}
{{+ <arg value="info"/>}}
{{+ </exec>}}
{{+ <loadproperties srcFile="svnlog">}}
{{+ <filterchain>}}
{{+ <linecontains>}}
{{+ <contains value="Last Changed Rev:"/>}}
{{+ </linecontains>}}
{{+ <replacestring from="Last Changed Rev:" to="lastchangedrev="/>}}
{{+ </filterchain>}}
{{+ </loadproperties>}}
{{+ <echo message="Last changed rev = ${lastchangedrev}"/>}}
{{ <propertyfile file="build.number" comment="## Auto generated build number. DO NOT MODIFY!">}}
{{- <entry key="build.number" type="date" operation="=" value="now" pattern="YYYYDDDHHmm"/>}}
{{+ <entry key="build.number" type="string" operation="=" value="${lastchangedrev}"/>}}
{{ </propertyfile>}}
{{ <property file="build.number"/>}}
{{+ <echo message="Build number ${build.number}"/>}}{{<!-- Compiler properties and
Test properties have been moved into build.properties -->}}

This produced a version string like this:  2.1.0_1837548 (which parses correctly with Version.java)

> Add a real build number to the Pivot (internal) version
> -------------------------------------------------------
>
>                 Key: PIVOT-1035
>                 URL: https://issues.apache.org/jira/browse/PIVOT-1035
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>
> Right now the internal Pivot version number looks like this:  2.1.0_00, where the final
"00" is always 00.  It would be helpful if we could implement a "real" build number to track
changes during development (for instance).  I'm not sure how this should work, but beginning
with the Ant "<buildnumber/>" task might be a start.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message