This is an automated email from the ASF dual-hosted git repository. mmuzaf pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push: new 2e097736dae IGNITE-17194 Fix update-versions script working on different OS (#10097) 2e097736dae is described below commit 2e097736daea079d9c33dd678f22b6f3fe46872b Author: Maxim Muzafarov <maxmu...@gmail.com> AuthorDate: Fri Jun 17 21:51:05 2022 +0300 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 e2fbb534a37..e9536c7b154 100644 --- a/modules/checkstyle/pom.xml +++ b/modules/checkstyle/pom.xml @@ -34,13 +34,13 @@ <groupId>org.apache.ignite</groupId> <artifactId>ignite-checkstyle</artifactId> - <version>2.14.0-SNAPSHOT</version> + <version>${revision}</version> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> - <maven.flatten.file.name>pom-installed.xml</maven.flatten.file.name> + <revision>2.14.0-SNAPSHOT</revision> </properties> <url>https://ignite.apache.org</url> diff --git a/scripts/update-versions.sh b/scripts/update-versions.sh index c664938f4d6..82f82caf4b4 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>.*<\/revision>/<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/<revision>\(.*\)</<revision>${1}</g" ./parent/pom.xml ./modules/checkstyle/pom.xml; + +echo Updating sub-modules versions to "$1" and resouces during the build -echo Updating .NET, C++ and other resources versions with Maven... -mvn initialize -P platforms +mvn install -P all-java,all-scala,platforms,skip-docs -DskipTests