[Buildbot-devel] short git hash property?
Vitali Lovich
vlovich at gmail.com
Sun Feb 8 19:33:03 UTC 2015
I would also recommend using something like <branch name>-<short hash> when creating directories.
> On Feb 8, 2015, at 11:22 AM, Jared Grubb <jared.grubb at gmail.com> wrote:
>
> Note that the Git step itself will run the ‘git describe’ value for you if you ask it to. The description will be available in the “commit-description” property.
>
> # to get the value from “git describe”
> Git(…, getDescription=True)
>
> # to get the value from “git describe --dirty --abbrev=10 --match ‘buildbot-*'”
> Git(…, getDescription={ ‘dirty’: True, ‘abbrev’: 10, ‘match’: ‘buildbot-*' })
>
> There’s some more docs: http://docs.buildbot.net/0.8.10/manual/cfg-buildsteps.html?highlight=git <http://docs.buildbot.net/0.8.10/manual/cfg-buildsteps.html?highlight=git>
>
> Jared
>
>> On Feb 7, 2015, at 10:28, Michael Labbé <mlabbe at gmail.com <mailto:mlabbe at gmail.com>> wrote:
>>
>> 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 <mailto: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/ <http://goparallel.sourceforge.net/>
>>>> _______________________________________________
>>>> Buildbot-devel mailing list
>>>> Buildbot-devel at lists.sourceforge.net <mailto:Buildbot-devel at lists.sourceforge.net>
>>>> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>>>
>>> --
>>> Kevin Funk | kevin.funk at kdab.com <mailto: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
>>
>>
>> ------------------------------------------------------------------------------
>> 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/ <http://goparallel.sourceforge.net/>
>> _______________________________________________
>> Buildbot-devel mailing list
>> Buildbot-devel at lists.sourceforge.net <mailto:Buildbot-devel at lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
> ------------------------------------------------------------------------------
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20150208/30ac8078/attachment.html>
More information about the devel
mailing list