[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0beta2-39-gc885bc7b9
git at osgeo.org
git at osgeo.org
Fri Aug 5 22:27:35 PDT 2022
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via c885bc7b97a33a6888fb0777a6fac64aa993e7f2 (commit)
from 497e793493ccf96492665cbeab7482484e3f2a36 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c885bc7b97a33a6888fb0777a6fac64aa993e7f2
Author: Sandro Santilli <strk at kbt.io>
Date: Sat Aug 6 07:26:59 2022 +0200
Consider full version when guarding against downgrades
References #5202 in master branch (3.3.0dev)
diff --git a/utils/create_upgrade.pl b/utils/create_upgrade.pl
index 2bd235f45..2fb2e4705 100755
--- a/utils/create_upgrade.pl
+++ b/utils/create_upgrade.pl
@@ -91,6 +91,7 @@ my $sql_file = $ARGV[0];
my $module = 'postgis';
my $soname = '';
my $version_to = "";
+my $version_to_full = "";
my $version_to_num = 0;
my $schema = "";
$schema = $ARGV[1] if @ARGV > 1;
@@ -130,8 +131,9 @@ close(INPUT);
die "Unable to locate target new version number in $sql_file\n"
if( !$version_to );
-if ( $version_to =~ /(\d+)\.(\d+)\..*/ )
+if ( $version_to =~ /(\d+)\.(\d+)\.(\d+)([^' ]*)/ )
{
+ $version_to_full = $1 . '.' . $2 . '.' . $3 . $4;
$version_to = $1 . "." . $2;
$version_to_num = 100 * $1 + $2;
}
@@ -142,7 +144,7 @@ else
print qq{
--
--- UPGRADE SCRIPT TO PostGIS $version_to
+-- UPGRADE SCRIPT TO PostGIS $version_to_full
--
};
@@ -158,7 +160,7 @@ print "SET search_path TO $schema;\n" if $schema;
#
while(<DATA>)
{
- s/NEWVERSION/$version_to/g;
+ s/NEWVERSION/$version_to_full/g;
s/MODULE/$module/g;
print;
}
-----------------------------------------------------------------------
Summary of changes:
utils/create_upgrade.pl | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list