Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » Does buckminster support jgit based Version Qualifiers?
Does buckminster support jgit based Version Qualifiers? [message #1159547] Mon, 28 October 2013 12:08 Go to next message
Lothar Werzinger is currently offline Lothar Werzinger
Messages: 153
Registered: July 2009
Location: Bay Area
Senior Member
Tycho supports Reproducible Version Qualifiers with jgit by calculating based on timestamp of the most recent commit that touches any file under project base directory.

Does buckminster support this, too?
Re: Does buckminster support jgit based Version Qualifiers? [message #1159994 is a reply to message #1159547] Mon, 28 October 2013 18:55 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas Hallgren
Messages: 3214
Registered: July 2009
Senior Member
On 2013-10-28 17:08, Lothar Werzinger wrote:
> Tycho supports http://wiki.eclipse.org/Tycho/Reproducible_Version_Qualifiers with jgit by calculating based on timestamp
> of the most recent commit that touches any file under project base directory.
>
> Does buckminster support this, too?

Yes. That's the default behavior for Git based projects.

- thomas
Re: Does buckminster support jgit based Version Qualifiers? [message #1160050 is a reply to message #1159994] Mon, 28 October 2013 19:55 Go to previous messageGo to next message
Lothar Werzinger is currently offline Lothar Werzinger
Messages: 153
Registered: July 2009
Location: Bay Area
Senior Member
Thomas Hallgren wrote on Mon, 28 October 2013 15:55
On 2013-10-28 17:08, Lothar Werzinger wrote:
> Tycho supports http://wiki.eclipse.org/Tycho/Reproducible_Version_Qualifiers with jgit by calculating based on timestamp
> of the most recent commit that touches any file under project base directory.
>
> Does buckminster support this, too?

Yes. That's the default behavior for Git based projects.

- thomas


We currently use generator.buildTimestamp.format to customize the generated qualifier

qualifier.replacement.*=generator:buildTimestamp
generator.buildTimestamp.format='D-${user.name}-'yyyyMMdd'-'HHmm


But that always uses the build time as the timestamp for every plugin and not the git timestamps for the individual plugins.

How can we instruct Buckminster to use the git timestamps?
Re: Does buckminster support jgit based Version Qualifiers? [message #1160316 is a reply to message #1160050] Tue, 29 October 2013 00:06 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas Hallgren
Messages: 3214
Registered: July 2009
Senior Member
On 2013-10-29 00:55, Lothar Werzinger wrote:
> Thomas Hallgren wrote on Mon, 28 October 2013 15:55
>> On 2013-10-28 17:08, Lothar Werzinger wrote:
>> > Tycho supports http://wiki.eclipse.org/Tycho/Reproducible_Version_Qualifiers with jgit by calculating based on
>> timestamp
>> > of the most recent commit that touches any file under project base directory.
>> >
>> > Does buckminster support this, too?
>>
>> Yes. That's the default behavior for Git based projects.
>>
>> - thomas
>
>
> We currently use generator.buildTimestamp.format to customize the generated qualifier
>
>
> qualifier.replacement.*=generator:buildTimestamp
> generator.buildTimestamp.format='D-${user.name}-'yyyyMMdd'-'HHmm
>
>
> But that always uses the build time as the timestamp for every plugin and not the git timestamps for the individual
> plugins.
>
> How can we instruct Buckminster to use the git timestamps?
>
Try this:

qualifier.replacement.*=generator:lastModified
generator.lastModified.format='D-${user.name}-'yyyyMMdd'-'HHmm

- thomas
Re: Does buckminster support jgit based Version Qualifiers? [message #1161191 is a reply to message #1160316] Tue, 29 October 2013 12:41 Go to previous messageGo to next message
Matthew Webber is currently offline Matthew Webber
Messages: 198
Registered: December 2010
Senior Member
That works for us. Specifically, we use
qualifier.replacement.*=generator:lastModified
generator.lastModified.format='v'yyyyMMdd-HHmm

The main thing to remember is that you need the .qualifier on the end of the version number in all bundles, features and products - we got caught once by that, when the version did not change because one component had a fixed version number.
Re: Does buckminster support jgit based Version Qualifiers? [message #1161234 is a reply to message #1160316] Tue, 29 October 2013 13:20 Go to previous messageGo to next message
Lothar Werzinger is currently offline Lothar Werzinger
Messages: 153
Registered: July 2009
Location: Bay Area
Senior Member
Thomas Hallgren wrote on Mon, 28 October 2013 21:06
On 2013-10-29 00:55,
Try this:

qualifier.replacement.*=generator:lastModified
generator.lastModified.format='D-${user.name}-'yyyyMMdd'-'HHmm

- thomas


Thanks that works.
Re: Does buckminster support jgit based Version Qualifiers? [message #1165776 is a reply to message #1161191] Fri, 01 November 2013 10:33 Go to previous message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1305
Registered: July 2009
Senior Member
On 29/10/2013 17:41, Matthew Webber wrote:
> That works for us. Specifically, we use
> qualifier.replacement.*=generator:lastModified
> generator.lastModified.format='v'yyyyMMdd-HHmm
>
> The main thing to remember is that you need the .qualifier on the end of
> the version number in all bundles, features and products - we got caught
> once by that, when the version did not change because one component had
> a fixed version number.

The other thing to remember, if you run the build locally on your
machine, is that the changes to the bundles and features must be
committed, since the timestamp corresponds to the last git commit (If I
remember correctly).

I also experienced another problem when building on Jenkins triggered by
Gerrit: remember to set the refspec to $GERRIT_REFSPEC, otherwise the
timestamp will not correspond to the last patchset...

hope this helps :)
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Previous Topic:Strategy for locale fragments
Next Topic:Cannot build p2.site containing xtext
Goto Forum:
  


Current Time: Thu Jul 24 00:36:24 EDT 2014

Powered by FUDForum. Page generated in 0.02216 seconds