Skip to content

Commit 3c66069

Browse files
committed
Modify change-scala-version.sh to choose scala.version from <profile>.
1 parent 4cdc8c5 commit 3c66069

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dev/change-scala-version.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ find "$BASEDIR" -name 'pom.xml' -not -path '*target*' -print \
6464
# First find the right full version from the profile's build
6565
# NOTE: We used to fetch the value of scala.version before but sed is used now. This is a workaround for SPARK-34762.
6666
ESCAPED_TO_VERSION=$(echo $TO_VERSION | sed -n "s/\./\\\\./gp")
67-
SCALA_VERSION=$(sed -n "s;^.*<scala-$ESCAPED_TO_VERSION\.version>\(.*\)</scala-$ESCAPED_TO_VERSION\.version>.*$;\1;p" pom.xml)
67+
SCALA_VERSION=$(sed -n "/<id>scala-$ESCAPED_TO_VERSION<\/id>/,/<\/profile>/ \
68+
s;^.*<scala\.version>\(.*\)</scala\.version>.*$;\1;p" pom.xml)
6869
sed_i '1,/<scala\.version>[0-9]*\.[0-9]*\.[0-9]*</s/<scala\.version>[0-9]*\.[0-9]*\.[0-9]*</<scala.version>'$SCALA_VERSION'</' \
6970
"$BASEDIR/pom.xml"
7071

0 commit comments

Comments
 (0)