From 2e097736daea079d9c33dd678f22b6f3fe46872b Mon Sep 17 00:00:00 2001 From: Maxim Muzafarov Date: Fri, 17 Jun 2022 21:51:05 +0300 Subject: [PATCH] IGNITE-17194 Fix update-versions script working on different OS (#10097) * IGNITE-17194 Fix update-versions script working on different OS * IGNITE-17194 Fix update-versions script working on different OS 2 * IGNITE-17194 Fix update-versions script working on different OS 3 --- modules/checkstyle/pom.xml | 4 ++-- scripts/update-versions.sh | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/modules/checkstyle/pom.xml b/modules/checkstyle/pom.xml index e2fbb534a3759..e9536c7b154ff 100644 --- a/modules/checkstyle/pom.xml +++ b/modules/checkstyle/pom.xml @@ -34,13 +34,13 @@ org.apache.ignite ignite-checkstyle - 2.14.0-SNAPSHOT + ${revision} 1.8 1.8 - pom-installed.xml + 2.14.0-SNAPSHOT https://ignite.apache.org diff --git a/scripts/update-versions.sh b/scripts/update-versions.sh index c664938f4d697..82f82caf4b4d0 100755 --- a/scripts/update-versions.sh +++ b/scripts/update-versions.sh @@ -30,11 +30,17 @@ if [ $# -eq 0 ] exit 1 fi -echo Updating Java versions to $1 with Maven... -sed -i '' -e "s/.*<\/revision>/$1<\/revision>/" ./parent/pom.xml; +SED_OPTION=(-i) -echo Updating checkstyle resources versions to $1 with Maven... -mvn -pl modules/checkstyle versions:set -DnewVersion=$1 -DgenerateBackupPoms=false -DoldVersion=* -DprocessDependencies=false +if [[ "$OSTYPE" == "darwin"* ]]; then + SED_OPTION=(-i '') +fi + +echo Updating versions to "$1" + +# The ignite-checkstyle module has it's own Apache parent, so in has to be updated independently. +sed "${SED_OPTION[@]}" -e "s/\(.*\)${1}