[PATCH] bfd/version.h: Add rationale for BFD_VERSION_DATE (Re: meaning of "Automatic date update in version.in" commits)

Pedro Alves palves@redhat.com
Fri Sep 22 13:59:00 GMT 2017


On 09/22/2017 02:47 PM, Joel Brobecker wrote:
>>> I assume that the bot is just replacing the line with
>>> BFD_VERSION_DATE instead of regenerating the whole file from
>>> scratch, but that's just guessing.  (I don't have sourceware
>>> shell access; I have no idea how the auto updater is implemented.)
>>
>> Back when I ran the cron job on my home machine, it did
>> sed -e 's/20[0-9]*/'`date +%Y%m%d`/ < bfd/version.h > bfd/version.h.new
>>
>> I'm not sure what is done nowadays.  You could always commit the patch
>> and see what happens.  :)

:-)

> 
> It should work no problem, as long as there is no date in the comment.
> The script that we run nightly on sourceware.org (update-git-version)
> does pretty much the same as what you were doing:
> 
>     sed \
>         -e 's/[Y0-9][Y0-9][Y0-9][Y0-9]-[M0-9][M0-9]-[D0-9][D0-9]/'$date'/' \
>         -e 's/[Y0-9][Y0-9][Y0-9][Y0-9][M0-9][M0-9][D0-9][D0-9]/'$DATE'/' \
>         < ${file} > ${file}.new
> 

Alright, thanks for confirming!  I pushed the patch in.

Thanks,
Pedro Alves



More information about the Binutils mailing list