zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mina...@apache.org
Subject zeppelin git commit: [ZEPPELIN-1180] Update publish_release.sh to publish scala 210 and scala 211 artifacts
Date Sun, 24 Jul 2016 14:40:48 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.6 e9ebdc5fe -> 04f9b25be


[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 <minalee@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

(cherry picked from commit 1077921b7bb56f1597d4ee733e7d7e44b57ba090)
Signed-off-by: Mina Lee <minalee@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/04f9b25b
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/04f9b25b
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/04f9b25b

Branch: refs/heads/branch-0.6
Commit: 04f9b25be182da8a68d4408617e681a5b08ccdb7
Parents: e9ebdc5
Author: Mina Lee <minalee@apache.org>
Authored: Sat Jul 23 14:09:04 2016 +0900
Committer: Mina Lee <minalee@apache.org>
Committed: Sun Jul 24 23:40:40 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/04f9b25b/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 29a7a6a..de0e5dc 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/04f9b25b/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/04f9b25b/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/04f9b25b/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/04f9b25b/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/04f9b25b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
old mode 100755
new mode 100644
index 85c69e2..d5edff1
--- 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>


Mime
View raw message