[Buildbot-devel] short git hash property?
Michael Labbé
mlabbe at gmail.com
Sat Feb 7 18:28:45 UTC 2015
Thanks! This is exactly what I needed.
I imagine most Git users will end up with this issue, so maybe this is a good example for the manual.
Michael Labbé
> On Feb 7, 2015, at 1:13 AM, Kevin Funk <kevin.funk at kdab.com> wrote:
>
> On Friday 06 February 2015 18:23:58 Michael Labbé wrote:
>> I am using the got_revision property to create files and directories to
>> deploy installers.
>>
>> Long git hashes are rough and make everyone go crosseyed when they see them
>> in their file browsers.
>>
>> How do I get a short git hash in a property in BuildBot? Or, because this is
>> literally just truncating the hash to 7 characters (28 bits), is there a
>> way to process the property on the server?
>>
>> I’d do it in the tools being called in my build steps, but they are many and
>> range across platforms.
>
> We just do it this way:
>
> As one of the very first steps:
>
> addStep(SetPropertyFromCommand(command=["git", "describe"],
> workdir="source", property="version"))
>
> And then just use the "version" property instead of "got_revision".
>
> Also has the benefit of getting the name of the last tag into the string
> (useful for package names).
>
> Greets
>
>>
>> -Mike
>> ----------------------------------------------------------------------------
>> -- Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is
>> your hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more. Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Buildbot-devel mailing list
>> Buildbot-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
> --
> Kevin Funk | kevin.funk at kdab.com | Software Engineer
> KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
> Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
> KDAB - Qt Experts - Platform-independent software solutions
More information about the devel
mailing list