diff options
| author | Tom Lane | 2016-08-15 17:49:49 +0000 |
|---|---|---|
| committer | Tom Lane | 2016-08-15 17:49:49 +0000 |
| commit | ca9112a424ff68ec4f2ef67b47122f7d61412964 (patch) | |
| tree | da13d4eead313a32e53849ea0b7dd1de9a00fb29 /src/tools | |
| parent | b5bce6c1ec6061c8a4f730d927e162db7e2ce365 (diff) | |
Stamp HEAD as 10devel.
This is a good bit more complicated than the average new-version stamping
commit, because it includes various adjustments in pursuit of changing
from three-part to two-part version numbers. It's likely some further
work will be needed around that change; but this is enough to get through
the regression tests, at least in Unix builds.
Peter Eisentraut and Tom Lane
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/msvc/Solution.pm | 6 | ||||
| -rwxr-xr-x | src/tools/version_stamp.pl | 14 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index f07029bce16..9cb1ad36cf3 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -131,12 +131,12 @@ sub GenerateFiles if (/^AC_INIT\(\[PostgreSQL\], \[([^\]]+)\]/) { $self->{strver} = $1; - if ($self->{strver} !~ /^(\d+)\.(\d+)(?:\.(\d+))?/) + if ($self->{strver} !~ /^(\d+)(?:\.(\d+))?/) { confess "Bad format of version: $self->{strver}\n"; } - $self->{numver} = sprintf("%d%02d%02d", $1, $2, $3 ? $3 : 0); - $self->{majorver} = sprintf("%d.%d", $1, $2); + $self->{numver} = sprintf("%d%04d", $1, $2 ? $2 : 0); + $self->{majorver} = sprintf("%d", $1); } } close(C); diff --git a/src/tools/version_stamp.pl b/src/tools/version_stamp.pl index cc685453dd6..3edd7bedaf5 100755 --- a/src/tools/version_stamp.pl +++ b/src/tools/version_stamp.pl @@ -22,8 +22,7 @@ # Major version is hard-wired into the script. We update it when we branch # a new development version. -$major1 = 9; -$major2 = 6; +$majorversion = 10; # Validate argument and compute derived variables $minor = shift; @@ -60,7 +59,6 @@ else } # Create various required forms of the version number -$majorversion = $major1 . "." . $major2; if ($dotneeded) { $fullversion = $majorversion . "." . $minor; @@ -70,7 +68,7 @@ else $fullversion = $majorversion . $minor; } $numericversion = $majorversion . "." . $numericminor; -$padnumericversion = sprintf("%d%02d%02d", $major1, $major2, $numericminor); +$padnumericversion = sprintf("%d%04d", $majorversion, $numericminor); # Get the autoconf version number for eventual nag message # (this also ensures we're in the right directory) @@ -110,15 +108,15 @@ sed_file("src/include/pg_config.h.win32", ); sed_file("src/interfaces/libpq/libpq.rc.in", -"-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $major1,$major2,$numericminor,0/' " - . "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $major1,$major2,$numericminor,0/' " +"-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $majorversion,0,$numericminor,0/' " + . "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $majorversion,0,$numericminor,0/' " . "-e 's/VALUE \"FileVersion\", \"[0-9.]*/VALUE \"FileVersion\", \"$numericversion/' " . "-e 's/VALUE \"ProductVersion\", \"[0-9.]*/VALUE \"ProductVersion\", \"$numericversion/'" ); sed_file("src/port/win32ver.rc", -"-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $major1,$major2,$numericminor,0/' " - . "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $major1,$major2,$numericminor,0/'" +"-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $majorversion,0,$numericminor,0/' " + . "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $majorversion,0,$numericminor,0/'" ); print "Stamped these files with version number $fullversion:\n$fixedfiles"; |
