Skip to content

Commit 7ac072f

Browse files
srowenpwendell
authored andcommitted
SPARK-5143 [BUILD] [WIP] spark-network-yarn 2.11 depends on spark-network-shuffle 2.10
Update `<scala.binary.version>` prop in POM when switching between Scala 2.10/2.11 ScrapCodes for review. This `sed` command is supposed to just replace the first occurrence, but it replaces them all. Are you more of a `sed` wizard than I? It may be a GNU/BSD thing that is throwing me off. Really, just the first instance should be replaced, hence the `[WIP]`. NB on OS X the original `sed` command here will create files like `pom.xml-e` through the source tree though it otherwise works. It's like `-e` is also the arg to `-i`. I couldn't get rid of that even with `-i""`. No biggie. Author: Sean Owen <[email protected]> Closes apache#4876 from srowen/SPARK-5143 and squashes the following commits: b060c44 [Sean Owen] Oops, fixed reversed version numbers! e875d4a [Sean Owen] Add note about non-GNU sed; fix new pom.xml update to work as intended on GNU sed 703e1eb [Sean Owen] Update scala.binary.version prop in POM when switching between Scala 2.10/2.11
1 parent 1aa90e3 commit 7ac072f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

dev/change-version-to-2.10.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,11 @@
1616
# See the License for the specific language governing permissions and
1717
# limitations under the License.
1818
#
19+
20+
# Note that this will not necessarily work as intended with non-GNU sed (e.g. OS X)
21+
1922
find . -name 'pom.xml' | grep -v target \
20-
| xargs -I {} sed -i -e 's|\(artifactId.*\)_2.11|\1_2.10|g' {}
23+
| xargs -I {} sed -i -e 's/\(artifactId.*\)_2.11/\1_2.10/g' {}
24+
25+
# Also update <scala.binary.version> in parent POM
26+
sed -i -e '0,/<scala\.binary\.version>2.11</s//<scala.binary.version>2.10</' pom.xml

dev/change-version-to-2.11.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,10 @@
1717
# limitations under the License.
1818
#
1919

20+
# Note that this will not necessarily work as intended with non-GNU sed (e.g. OS X)
21+
2022
find . -name 'pom.xml' | grep -v target \
21-
| xargs -I {} sed -i -e 's|\(artifactId.*\)_2.10|\1_2.11|g' {}
23+
| xargs -I {} sed -i -e 's/\(artifactId.*\)_2.10/\1_2.11/g' {}
24+
25+
# Also update <scala.binary.version> in parent POM
26+
sed -i -e '0,/<scala\.binary\.version>2.10</s//<scala.binary.version>2.11</' pom.xml

0 commit comments

Comments
 (0)