You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mi...@apache.org on 2016/07/24 14:40:34 UTC
zeppelin git commit: [ZEPPELIN-1180] Update publish_release.sh to
publish scala 210 and scala 211 artifacts
Repository: zeppelin
Updated Branches:
refs/heads/master 8546666d5 -> 1077921b7
[ZEPPELIN-1180] Update publish_release.sh to publish scala 210 and scala 211 artifacts
### What is this PR for?
- Update publish_release.sh to publish scala 2.10 and scala 2.11 artifacts to maven repository.
- Set build spark version to 2.0
This PR supposed to work once #1186 and #1195 is merged
### What type of PR is it?
Improvement
### What is the Jira issue?
[ZEPPELIN-1180](https://issues.apache.org/jira/browse/ZEPPELIN-1180)
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Mina Lee <mi...@apache.org>
Closes #1209 from minahlee/ZEPPELIN-1180 and squashes the following commits:
40e5718 [Mina Lee] Use underscore as word separator in file name for consistency
0a91932 [Mina Lee] Include all module for scala 2.11 artifact build
c1d6439 [Mina Lee] publish 2.11 artifact to maven
a7918f0 [Mina Lee] Fix mod from 755 to 644
bca1af1 [Mina Lee] Fix indentation
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/1077921b
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/1077921b
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/1077921b
Branch: refs/heads/master
Commit: 1077921b7bb56f1597d4ee733e7d7e44b57ba090
Parents: 8546666
Author: Mina Lee <mi...@apache.org>
Authored: Sat Jul 23 14:09:04 2016 +0900
Committer: Mina Lee <mi...@apache.org>
Committed: Sun Jul 24 23:40:24 2016 +0900
----------------------------------------------------------------------
.travis.yml | 2 +-
dev/change-scala-version.sh | 67 ----------------------------------------
dev/change_scala_version.sh | 67 ++++++++++++++++++++++++++++++++++++++++
dev/publish_release.sh | 22 ++++++++++---
kylin/pom.xml | 0
pom.xml | 2 +-
6 files changed, 87 insertions(+), 73 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1077921b/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 1d25a67..1656f4b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -76,7 +76,7 @@ before_install:
- R -e "install.packages('knitr', repos = 'http://cran.us.r-project.org', lib='~/R')"
- export R_LIBS='~/R'
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1600x1024x16"
- - ./dev/change-scala-version.sh $SCALA_VER
+ - ./dev/change_scala_version.sh $SCALA_VER
install:
- mvn $BUILD_FLAG $PROFILE -B
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1077921b/dev/change-scala-version.sh
----------------------------------------------------------------------
diff --git a/dev/change-scala-version.sh b/dev/change-scala-version.sh
deleted file mode 100755
index cb2c842..0000000
--- a/dev/change-scala-version.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env 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.
-#
-
-set -e
-
-VALID_VERSIONS=( 2.10 2.11 )
-
-usage() {
- echo "Usage: $(basename $0) [-h|--help] <version>
-where :
- -h| --help Display this help text
- valid version values : ${VALID_VERSIONS[*]}
-" 1>&2
- exit 1
-}
-
-if [[ ($# -ne 1) || ( $1 == "--help") || $1 == "-h" ]]; then
- usage
-fi
-
-TO_VERSION=$1
-
-check_scala_version() {
- for i in ${VALID_VERSIONS[*]}; do [ $i = "$1" ] && return 0; done
- echo "Invalid Scala version: $1. Valid versions: ${VALID_VERSIONS[*]}" 1>&2
- exit 1
-}
-
-check_scala_version "$TO_VERSION"
-
-if [ $TO_VERSION = "2.11" ]; then
- FROM_VERSION="2.10"
-else
- FROM_VERSION="2.11"
-fi
-
-sed_i() {
- sed -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/\(artifactId.*\)_'$FROM_VERSION'/\1_'$TO_VERSION'/g' {}" \;
-
-# Also update <scala.binary.version> in parent POM
-# Match any scala binary version to ensure idempotency
-sed_i '1,/<scala\.binary\.version>[0-9]*\.[0-9]*</s/<scala\.binary\.version>[0-9]*\.[0-9]*</<scala.binary.version>'$TO_VERSION'</' \
- "$BASEDIR/pom.xml"
-
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1077921b/dev/change_scala_version.sh
----------------------------------------------------------------------
diff --git a/dev/change_scala_version.sh b/dev/change_scala_version.sh
new file mode 100755
index 0000000..cb2c842
--- /dev/null
+++ b/dev/change_scala_version.sh
@@ -0,0 +1,67 @@
+#!/usr/bin/env 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.
+#
+
+set -e
+
+VALID_VERSIONS=( 2.10 2.11 )
+
+usage() {
+ echo "Usage: $(basename $0) [-h|--help] <version>
+where :
+ -h| --help Display this help text
+ valid version values : ${VALID_VERSIONS[*]}
+" 1>&2
+ exit 1
+}
+
+if [[ ($# -ne 1) || ( $1 == "--help") || $1 == "-h" ]]; then
+ usage
+fi
+
+TO_VERSION=$1
+
+check_scala_version() {
+ for i in ${VALID_VERSIONS[*]}; do [ $i = "$1" ] && return 0; done
+ echo "Invalid Scala version: $1. Valid versions: ${VALID_VERSIONS[*]}" 1>&2
+ exit 1
+}
+
+check_scala_version "$TO_VERSION"
+
+if [ $TO_VERSION = "2.11" ]; then
+ FROM_VERSION="2.10"
+else
+ FROM_VERSION="2.11"
+fi
+
+sed_i() {
+ sed -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/\(artifactId.*\)_'$FROM_VERSION'/\1_'$TO_VERSION'/g' {}" \;
+
+# Also update <scala.binary.version> in parent POM
+# Match any scala binary version to ensure idempotency
+sed_i '1,/<scala\.binary\.version>[0-9]*\.[0-9]*</s/<scala\.binary\.version>[0-9]*\.[0-9]*</<scala.binary.version>'$TO_VERSION'</' \
+ "$BASEDIR/pom.xml"
+
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1077921b/dev/publish_release.sh
----------------------------------------------------------------------
diff --git a/dev/publish_release.sh b/dev/publish_release.sh
index 63dc00b..fc355d5 100755
--- a/dev/publish_release.sh
+++ b/dev/publish_release.sh
@@ -44,7 +44,7 @@ NC='\033[0m' # No Color
RELEASE_VERSION="$1"
GIT_TAG="$2"
-PUBLISH_PROFILES="-Pspark-1.6 -Phadoop-2.4 -Pyarn -Ppyspark -Psparkr -Pr"
+PUBLISH_PROFILES="-Pspark-2.0 -Phadoop-2.4 -Pyarn -Ppyspark -Psparkr -Pr"
PROJECT_OPTIONS="-pl !zeppelin-distribution"
NEXUS_STAGING="https://repository.apache.org/service/local/staging"
NEXUS_PROFILE="153446d1ac37c4"
@@ -92,13 +92,27 @@ function publish_to_maven() {
tmp_repo="$(mktemp -d /tmp/zeppelin-repo-XXXXX)"
+ # build with scala-2.10
echo "mvn clean install -Ppublish-distr \
- -Dmaven.repo.local=${tmp_repo} \
+ -Dmaven.repo.local=${tmp_repo} -Pscala-2.10 \
${PUBLISH_PROFILES} ${PROJECT_OPTIONS}"
- mvn clean install -Ppublish-distr -Dmaven.repo.local="${tmp_repo}" \
+ mvn clean install -Ppublish-distr -Dmaven.repo.local="${tmp_repo}" -Pscala-2.10 \
${PUBLISH_PROFILES} ${PROJECT_OPTIONS}
if [[ $? -ne 0 ]]; then
- echo "Build failed."
+ echo "Build with scala 2.10 failed."
+ exit 1
+ fi
+
+ # build with scala-2.11
+ "${BASEDIR}/change_scala_version.sh" 2.11
+
+ echo "mvn clean install -Ppublish-distr \
+ -Dmaven.repo.local=${tmp_repo} -Pscala-2.11 \
+ ${PUBLISH_PROFILES} ${PROJECT_OPTIONS}"
+ mvn clean install -Ppublish-distr -Dmaven.repo.local="${tmp_repo}" -Pscala-2.11 \
+ ${PUBLISH_PROFILES} ${PROJECT_OPTIONS}
+ if [[ $? -ne 0 ]]; then
+ echo "Build with scala 2.11 failed."
exit 1
fi
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1077921b/kylin/pom.xml
----------------------------------------------------------------------
diff --git a/kylin/pom.xml b/kylin/pom.xml
old mode 100755
new mode 100644
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1077921b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
old mode 100755
new mode 100644
index 918f97c..c5c429b
--- a/pom.xml
+++ b/pom.xml
@@ -425,7 +425,7 @@
<exclude>.github/*</exclude>
<exclude>.gitignore</exclude>
<exclude>.repository/</exclude>
- <exclude>.Rhistory</exclude>
+ <exclude>.Rhistory</exclude>
<exclude>**/*.diff</exclude>
<exclude>**/*.patch</exclude>
<exclude>**/*.avsc</exclude>