Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Does buckminster support jgit based Version Qualifiers?
Does buckminster support jgit based Version Qualifiers? [message #1159547] Mon, 28 October 2013 16:08 Go to next message
Lothar Werzinger is currently offline Lothar WerzingerFriend
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 22:55 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
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 23:55 Go to previous messageGo to next message
Lothar Werzinger is currently offline Lothar WerzingerFriend
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 04:06 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
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 16:41 Go to previous messageGo to next message
Matthew Webber is currently offline Matthew WebberFriend
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 17:20 Go to previous messageGo to next message
Lothar Werzinger is currently offline Lothar WerzingerFriend
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 14:33 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1815
Registered: July 2009
Location: Firenze, Italy
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: Fri Dec 06 11:15:06 GMT 2024

Powered by FUDForum. Page generated in 0.09697 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top