Skip to content

Commit

Permalink
IGNITE-17194 Fix update-versions script working on different OS (apac…
Browse files Browse the repository at this point in the history
…he#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
  • Loading branch information
Mmuzaf authored Jun 17, 2022
1 parent 1632bc4 commit 2e09773
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions modules/checkstyle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
18 changes: 12 additions & 6 deletions scripts/update-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2e09773

Please sign in to comment.