[Vm-dev] I want to add commit id to VM version

Esteban Lorenzano estebanlm at gmail.com
Fri Sep 30 17:43:14 UTC 2016


> On 30 Sep 2016, at 17:43, Norbert Hartl <norbert at hartl.name> wrote:
> 
> 
> 
>> Am 30.09.2016 um 17:32 schrieb Eliot Miranda <eliot.miranda at gmail.com>:
>> 
>> 
>> Hi Esteban,
>> 
>> 
>>> On Sep 30, 2016, at 5:41 AM, Esteban Lorenzano <estebanlm at gmail.com> wrote:
>>> 
>>> 
>>> Hi, 
>>> 
>>> I would like to add also commit id to current VM version. 
>>> We now have this: 
>>> 
>>> VM: 201609281647 https://github.com/estebanlm/opensmalltalk-vm.git $ 
>>> Date: Wed Sep 28 18:47:01 2016 +0200 $ 
>>> Plugins: 201609281647 https://github.com/estebanlm/opensmalltalk-vm.git $
>>> 
>>> And that’s ok, of course. 
>>> But I would want also to have the commit version (it makes easier some queries). Something like this: 
>>> 
>>> VM: 201609281647 https://github.com/estebanlm/opensmalltalk-vm.git $ 
>>> Date: Wed Sep 28 18:47:01 2016 +0200 $ 
>>> Plugins: 201609281647 https://github.com/estebanlm/opensmalltalk-vm.git $
>>> Commit: 09aaed https://github.com/estebanlm/opensmalltalk-vm.git $
>>> 
>>> What do you think, may I proceed?
>> 
>> We discussed this at length during the summer.  I very much wanted this too, but it is impossible with git.  Any kind of change to the source requires a commit and there is no way of getting hold of the here t commit I'd during a commit. So one can only add an older commit I'd to the source, never the current one.  So what we have is as good as one can get until the git designers add some new facility.  :-(
> 
> The commit number is attached to the commit as metadata. So although it is not _in_ the source it is _with_ the source. If you build the vm you just need something reading this version number and compile it in. Or is the vm version"Date: Wed Sep 28 18:47:01 2016 +0200"  the date of the commit?
> I use "git describe" for that. It gives
> 
> 1.3-24-gc0cd61a
> 
> where 1.3 is the latest tag. 24 is the number of commits since the commit the tag was attached to. And gc0cd61a being the commit hash.

Exactly. On building time I can add that extra data (that’s what we do in Pharo). 

> 
> Norbert

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160930/d1647742/attachment.htm


More information about the Vm-dev mailing list