This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

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/
>> 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 (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.

Pedro Alves

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]