Skip to content

Commit b0b8dff

Browse files
committed
Properly zero-pad the day-of-year part of the win32 build number
This ensure the version number increases over time. The first three digits in the version number is still set to the actual PostgreSQL version number, but the last one is intended to be an ever increasing build number, which previosly failed when it changed between 1, 2 and 3 digits long values. Noted by Deepak
1 parent e09825a commit b0b8dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/msvc/Project.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ sub AddResourceFile
308308

309309
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
310310
localtime(time);
311-
my $d = ($year - 100) . "$yday";
311+
my $d = sprintf("%02d%03d", ($year - 100), $yday);
312312

313313
if (Solution::IsNewer("$dir\\win32ver.rc", 'src\port\win32ver.rc'))
314314
{

0 commit comments

Comments
 (0)