Skip to content

Commit 1d857a6

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 ec26900 commit 1d857a6

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
@@ -306,7 +306,7 @@ sub AddResourceFile
306306
my ($self, $dir, $desc, $ico) = @_;
307307

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

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

0 commit comments

Comments
 (0)