diff --git a/jvm-packages/dev/change_version.sh b/jvm-packages/dev/change_version.sh new file mode 100755 index 000000000..bb25dde9e --- /dev/null +++ b/jvm-packages/dev/change_version.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +#!/bin/bash + +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# (Yizhi) This is mainly inspired by the script in apache/spark. +# I did some modificaiton to get it with our project. +# (Nan) Modified from MxNet + +set -e + +if [[ ($# -ne 2) || ( $1 == "--help") || $1 == "-h" ]]; then + echo "Usage: $(basename $0) [-h|--help] " 1>&2 + exit 1 +fi + +FROM_VERSION=$1 +TO_VERSION=$2 + +sed_i() { + perl -p -000 -e "$1" "$2" > "$2.tmp" && mv "$2.tmp" "$2" +} + +export -f sed_i + +BASEDIR=$(dirname $0)/.. +find "$BASEDIR" -name 'pom.xml' -not -path '*target*' -print \ + -exec bash -c \ + "sed_i 's/((xgboost-jvm|xgboost4j-.*)<\/artifactId>\s+'$FROM_VERSION'(<\/version>)/\1>'$TO_VERSION'\3/g' {}" \; diff --git a/jvm-packages/pom.xml b/jvm-packages/pom.xml index b1575096e..3050bfc9a 100644 --- a/jvm-packages/pom.xml +++ b/jvm-packages/pom.xml @@ -6,7 +6,7 @@ ml.dmlc xgboost-jvm - 0.7 + 0.8-SNAPSHOT pom UTF-8 diff --git a/jvm-packages/xgboost4j-example/pom.xml b/jvm-packages/xgboost4j-example/pom.xml index d08a38941..e9e4827db 100644 --- a/jvm-packages/xgboost4j-example/pom.xml +++ b/jvm-packages/xgboost4j-example/pom.xml @@ -6,10 +6,10 @@ ml.dmlc xgboost-jvm - 0.7 + 0.8-SNAPSHOT xgboost4j-example - 0.7 + 0.8-SNAPSHOT jar @@ -26,7 +26,7 @@ ml.dmlc xgboost4j-spark - 0.7 + 0.8-SNAPSHOT org.apache.spark @@ -37,7 +37,7 @@ ml.dmlc xgboost4j-flink - 0.7 + 0.8-SNAPSHOT org.apache.commons diff --git a/jvm-packages/xgboost4j-flink/pom.xml b/jvm-packages/xgboost4j-flink/pom.xml index 855e7e847..3fc76a96b 100644 --- a/jvm-packages/xgboost4j-flink/pom.xml +++ b/jvm-packages/xgboost4j-flink/pom.xml @@ -6,10 +6,10 @@ ml.dmlc xgboost-jvm - 0.7 + 0.8-SNAPSHOT xgboost4j-flink - 0.7 + 0.8-SNAPSHOT diff --git a/jvm-packages/xgboost4j-spark/pom.xml b/jvm-packages/xgboost4j-spark/pom.xml index 4f7f33fef..f37c0fb88 100644 --- a/jvm-packages/xgboost4j-spark/pom.xml +++ b/jvm-packages/xgboost4j-spark/pom.xml @@ -6,7 +6,7 @@ ml.dmlc xgboost-jvm - 0.7 + 0.8-SNAPSHOT xgboost4j-spark diff --git a/jvm-packages/xgboost4j/pom.xml b/jvm-packages/xgboost4j/pom.xml index d73775b6a..aa718ec0a 100644 --- a/jvm-packages/xgboost4j/pom.xml +++ b/jvm-packages/xgboost4j/pom.xml @@ -6,7 +6,7 @@ ml.dmlc xgboost-jvm - 0.7 + 0.8-SNAPSHOT xgboost4j 0.7