diff --git a/.ci/azure-pipelines/azure-pipelines.yml b/.ci/azure-pipelines/azure-pipelines.yml index ab0576fdd8e..7d9c4a3ee27 100644 --- a/.ci/azure-pipelines/azure-pipelines.yml +++ b/.ci/azure-pipelines/azure-pipelines.yml @@ -71,9 +71,9 @@ jobs: esac target=Experimental - major=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt) - minor=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt) - patch=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt) + major=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt) + minor=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt) + patch=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt) binary=$(curl --location-trusted http://ftp.osuosl.org/pub/osgeo/download/osgeo4w/$OSGEO4W_ARCH/release/qgis/$OSGEO4W_PKG/LATEST.sha | sed -e "s/:.*$//") (( binary++ )) || true diff --git a/debian/rules b/debian/rules index 13abea45ece..71dbc8749bc 100755 --- a/debian/rules +++ b/debian/rules @@ -46,9 +46,9 @@ endif DEB_BUILD_NAME ?= $(DISTRIBUTION)-$(DEB_BUILD_ARCH) -QGIS_MAJOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")/\1/p' CMakeLists.txt) -QGIS_MINOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")/\1/p' CMakeLists.txt) -QGIS_PATCH=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")/\1/p' CMakeLists.txt) +QGIS_MAJOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")/\1/ip' CMakeLists.txt) +QGIS_MINOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")/\1/ip' CMakeLists.txt) +QGIS_PATCH=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")/\1/ip' CMakeLists.txt) QGIS_ABI=$(QGIS_MAJOR).$(QGIS_MINOR).$(QGIS_PATCH) GRASS=grass$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1,2)) GRASSVER=$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1)) diff --git a/ms-windows/osgeo4w/creatensis.pl b/ms-windows/osgeo4w/creatensis.pl index f576e90e692..81d349d7989 100755 --- a/ms-windows/osgeo4w/creatensis.pl +++ b/ms-windows/osgeo4w/creatensis.pl @@ -284,13 +284,13 @@ my($major, $minor, $patch); open F, "../../CMakeLists.txt"; while() { - if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/) { + if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/i) { $major = $1; - } elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/) { + } elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/i) { $minor = $1; - } elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/) { + } elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/i) { $patch = $1; - } elsif(/SET\(RELEASE_NAME "(.+)"\)/) { + } elsif(/SET\(RELEASE_NAME "(.+)"\)/i) { $releasename = $1 unless defined $releasename; } } diff --git a/rpm/buildrpms.sh b/rpm/buildrpms.sh index 1cbbee201e7..6bf4d2f324b 100755 --- a/rpm/buildrpms.sh +++ b/rpm/buildrpms.sh @@ -115,11 +115,11 @@ else fi # Get the version string -major=$(grep -e 'SET(CPACK_PACKAGE_VERSION_MAJOR' ../CMakeLists.txt | +major=$(grep -ie 'SET(CPACK_PACKAGE_VERSION_MAJOR' ../CMakeLists.txt | sed -r 's/.*\"([0-9]+)\".*/\1/g') -minor=$(grep -e 'SET(CPACK_PACKAGE_VERSION_MINOR' ../CMakeLists.txt | +minor=$(grep -ie 'SET(CPACK_PACKAGE_VERSION_MINOR' ../CMakeLists.txt | sed -r 's/.*\"([0-9]+)\".*/\1/g') -patch=$(grep -e 'SET(CPACK_PACKAGE_VERSION_PATCH' ../CMakeLists.txt | +patch=$(grep -ie 'SET(CPACK_PACKAGE_VERSION_PATCH' ../CMakeLists.txt | sed -r 's/.*\"([0-9]+)\".*/\1/g') version=$major.$minor.$patch diff --git a/scripts/release.pl b/scripts/release.pl index 0c931b147e4..daa64e570a4 100755 --- a/scripts/release.pl +++ b/scripts/release.pl @@ -28,10 +28,10 @@ sub updateCMakeLists($$$$) { open I, "CMakeLists.txt.orig"; open O, ">CMakeLists.txt" or die "cannot create CMakeLists.txt: $!"; while() { - s/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/SET(CPACK_PACKAGE_VERSION_MAJOR "$major")/; - s/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/SET(CPACK_PACKAGE_VERSION_MINOR "$minor")/; - s/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/SET(CPACK_PACKAGE_VERSION_PATCH "$patch")/; - s/SET\(RELEASE_NAME "(.+)"\)/SET(RELEASE_NAME "$release")/; + s/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/set(CPACK_PACKAGE_VERSION_MAJOR "$major")/i; + s/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/set(CPACK_PACKAGE_VERSION_MINOR "$minor")/i; + s/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/set(CPACK_PACKAGE_VERSION_PATCH "$patch")/i; + s/SET\(RELEASE_NAME "(.+)"\)/set(RELEASE_NAME "$release")/i; print O; } close O; @@ -86,13 +86,13 @@ my $patch; my $releasename; open F, "CMakeLists.txt"; while() { - if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/) { + if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/i) { $major = $1; - } elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/) { + } elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/i) { $minor = $1; - } elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/) { + } elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/i) { $patch = $1; - } elsif(/SET\(RELEASE_NAME \"(.*)\"\)/) { + } elsif(/SET\(RELEASE_NAME \"(.*)\"\)/i) { $releasename = $1; } } diff --git a/scripts/tsstat.pl b/scripts/tsstat.pl index b06bb938c9d..f0fd6c89bf9 100755 --- a/scripts/tsstat.pl +++ b/scripts/tsstat.pl @@ -210,8 +210,8 @@ rename "i18n/CMakeLists.txt", "i18n/CMakeLists.txt.temp" || die "cannot rename i open I, "i18n/CMakeLists.txt.temp"; open O, ">i18n/CMakeLists.txt"; while() { - if( /^SET\(TS_FILES / || /^FILE \(GLOB TS_FILES \*\.ts\)/ ) { - print O "SET(TS_FILES " . join( " ", map { "qgis_$_\.ts"; } @ts ) . ")\n"; + if( /^SET\(TS_FILES /i ) { + print O "set(TS_FILES " . join( " ", map { "qgis_$_\.ts"; } @ts ) . ")\n"; } else { print O; }