You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Russel Winder <ru...@winder.org.uk> on 2016/10/09 04:58:10 UTC

Master builds

Would it be possible to include the Git identifier of the changeset
being compiled in the version number displayed by groovy -version for
Groovy build from master?
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Re: Master builds

Posted by Keegan Witt <ke...@gmail.com>.
Another way I've seen done is to execute "git rev-parse HEAD" in a custom
Gradle task and dump the result into a resource file (similar to how Groovy
provides the version info today).  But using Grgit/JGit is better since it
will work without the assumption that git is on your path.

-Keegan

On Tue, Oct 11, 2016 at 7:21 AM, Jochen Theodorou <bl...@gmx.org> wrote:

>
>
> On 11.10.2016 11:56, Paul King wrote:
>
>> Russel, do you know a project with a similar build setup already doing
>> this so we can 'borrow' their approach?
>>
>> On Sun, Oct 9, 2016 at 2:58 PM, Russel Winder <ru...@winder.org.uk>
>> wrote:
>>
>>> Would it be possible to include the Git identifier of the changeset
>>> being compiled in the version number displayed by groovy -version for
>>> Groovy build from master?
>>>
>>
> you mean like http://mrhaki.blogspot.de/2015/04/gradle-goodness-use-git-
> commit-id-in.html ? Or a newer version of git interaction, but not for
> the version number directly: http://mrhaki.blogspot.de/2016
> /06/grails-goodness-add-git-commit.html
>
> I was actually wondering if that suggestion of Russel makes sense to me
> and for what cases... But the more I think of it, the more I think it can
> be useful. For example to ensure the released version and the version voted
> on are identical.
>
> bye Jochen
>

Re: Master builds

Posted by Jochen Theodorou <bl...@gmx.org>.

On 11.10.2016 11:56, Paul King wrote:
> Russel, do you know a project with a similar build setup already doing
> this so we can 'borrow' their approach?
>
> On Sun, Oct 9, 2016 at 2:58 PM, Russel Winder <ru...@winder.org.uk> wrote:
>> Would it be possible to include the Git identifier of the changeset
>> being compiled in the version number displayed by groovy -version for
>> Groovy build from master?

you mean like 
http://mrhaki.blogspot.de/2015/04/gradle-goodness-use-git-commit-id-in.html 
? Or a newer version of git interaction, but not for the version number 
directly: 
http://mrhaki.blogspot.de/2016/06/grails-goodness-add-git-commit.html

I was actually wondering if that suggestion of Russel makes sense to me 
and for what cases... But the more I think of it, the more I think it 
can be useful. For example to ensure the released version and the 
version voted on are identical.

bye Jochen

Re: Master builds

Posted by Paul King <pa...@asert.com.au>.
Russel, do you know a project with a similar build setup already doing
this so we can 'borrow' their approach?

On Sun, Oct 9, 2016 at 2:58 PM, Russel Winder <ru...@winder.org.uk> wrote:
> Would it be possible to include the Git identifier of the changeset
> being compiled in the version number displayed by groovy -version for
> Groovy build from master?
> --
> Russel.
> =============================================================================
> Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net
> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder