Preserve original values of timestamp attribute for all files that are generated in FB snapshots (which can be downloaded via "Actions" page in github)
Please do NOT change timestamp of all FB files that are placed inside generated FB snapshpot (which can be further downloaded via github Actions). Currently all files (isql, fbclient, plugins/engineNN etc) are affected: they last-modified attribute is replaced with weird '09:00:00' or similar value. Adriano told me (privately) that this value is taken from: https://github.com/FirebirdSQL/firebird/blob/d957b16294eadcc4a9c9e4c3e5c3edcd8b4b8fe7/builds/install/arch-specific/win32/BuildExecutableInstall.bat#L509
if /I not "%FBBUILD_BUILDTYPE%"=="release" goto :EOF
if not defined TOUCH_COMMAND echo POSIX touch utility not found && exit /b 1
set TIMESTRING=0%FB_MAJOR_VER%:0%FB_MINOR_VER%:0%FB_REV_NO%
:: Perhaps here we should touch directories as well
:: Here and there XXX_COMMAND is "call"-ed in case if it is a batch file
@echo Touching release build files with %TIMESTRING% timestamp
@for /R %FB_OUTPUT_DIR% %%F in ( * ) do (
call %TOUCH_COMMAND% -c -d %TIMESTRING% %%F || exit /b 1
)
I really can't understand for what this is done - at least in the generated intermediate snapshots.
What problem it is supposed to fix ?
Often I download from "Actions" more than two times per day. All references to such snapshots (in QA tests) will have same timestamp in that case.
The problem is still not clear to me, sorry
I understand the problem. It should be easy to fix - as long as the snapshot builds are setting the env var to indicate a snapshot build. I'll take a look.
AFAIU the problem is that there is no way to distinguish two different CI artifacts during day because build number is raised only once a day.
Setting time to version number is an ancient DOS trick where the version was not in resources. Now it is completely pointless.
It is not completely pointless. It visually indicates the firebird version. It really is the simplest way to find this information. But it is certainly not necessary for snapshot builds.
Another thing is that Pavel said these hours was set to 9, while it should be 6 (for master). So it takes the current time zone in the game (for who sets it - don't know), but certainly for who reads it.
I see not much value in setting the time these days.
QA scripts already use Python and PowerShell so it is possible to get version from file directly (https://devblogs.microsoft.com/oldnewthing/20180529-00/?p=98855) but because of too seldom version increase it is useless. Perhaps Pavel should rely on commit hash instead.
@asfernandes - if the O/S adjusts the time for the region then that does make this 'feature' useless. The only solution then is to remove this.
Perhaps Pavel should rely on commit hash instead.
Yes, i also think about it. But in such case it will be very useful to put into FB snapshot empty file with name = hash. Or just add part of this hash (first 6-8 characters) as suffix to generated .zip that will be seen in "Actions" page.