You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/03/01 02:00:23 UTC

[incubator-doris-spark-connector] branch master updated: [chore] modify some script for building connector (#7)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris-spark-connector.git


The following commit(s) were added to refs/heads/master by this push:
     new d2e3f7e  [chore] modify some script for building connector (#7)
d2e3f7e is described below

commit d2e3f7e71f6807d91f83e052c91052aefab763fb
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Tue Mar 1 10:00:20 2022 +0800

    [chore] modify some script for building connector (#7)
---
 .asf.yaml                             | 41 ++++++++++++++++++++++++++
 .github/workflows/build-extension.yml |  4 +--
 CONTRIBUTING.md                       |  4 +--
 CONTRIBUTING_CN.md                    |  7 +++--
 NOTICE.txt                            |  2 +-
 spark-doris-connector/build.sh        | 54 +++++++++++++++++++++++++++--------
 spark-doris-connector/pom.xml         | 19 ++++++++++--
 7 files changed, 108 insertions(+), 23 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 0000000..bb7e17f
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,41 @@
+#
+# 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.
+#
+
+github:
+  description: Spark Connector for Apache Doris(incubating)
+  homepage: https://doris.apache.org/
+  labels:
+    - data-warehousing
+    - mpp
+    - olap
+    - dbms
+    - apache
+    - doris
+    - spark
+  enabled_merge_buttons:
+    squash:  true
+    merge:   false
+    rebase:  false
+  protected_branches:
+    master:
+      required_pull_request_reviews:
+        dismiss_stale_reviews: true
+        required_approving_review_count: 1
+notifications:
+  issues:       commits@doris.apache.org
+  commits:      commits@doris.apache.org
+  pullrequests: commits@doris.apache.org
diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml
index bce2a12..38e55e5 100644
--- a/.github/workflows/build-extension.yml
+++ b/.github/workflows/build-extension.yml
@@ -48,9 +48,9 @@ jobs:
 
     - name: Build spark connector v2
       run: |
-        cd spark-doris-connector/ && /bin/bash build.sh 2.3.4 2.11
+        cd spark-doris-connector/ && /bin/bash build.sh --spark 2.3.4 --scala 2.11
 
     - name: Build spark connector v3
       run: |
-        cd spark-doris-connector/ && /bin/bash build.sh 3.1.2 2.12
+        cd spark-doris-connector/ && /bin/bash build.sh --spark 3.1.2 --scala 2.12
 
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3c353cb..e132d9c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -17,8 +17,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# Contribute to Doris
+# Contribute to Doris and its surrounding projects
 
-Thank you very much for your interest in the Doris project. We welcome your suggestions, comments (including criticisms), comments and contributions to the Doris project.
+Thank you very much for your interest in the Doris and its surrounding projects. We welcome your suggestions, comments (including criticisms), comments and contributions to the Doris.
 
 For more information on how to contribute to Doris, please go to the Doris main repository [CONTRIBUTING](https://github.com/apache/incubator-doris/blob/master/CONTRIBUTING.md)
diff --git a/CONTRIBUTING_CN.md b/CONTRIBUTING_CN.md
index 5dc5fbe..528a1ce 100644
--- a/CONTRIBUTING_CN.md
+++ b/CONTRIBUTING_CN.md
@@ -17,8 +17,9 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# 为 Doris 做贡献
 
-非常感谢您对 Doris 项目感兴趣,我们非常欢迎您对 Doris 项目的各种建议、意见(包括批评)、评论和贡献。
+# 为 Doris 及其周边项目做贡献
 
-关于如何为 Doris 做贡献,请前往 Doris 主库查阅 [CONTRIBUTING_CN](https://github.com/apache/incubator-doris/blob/master/CONTRIBUTING_CN.md)
+非常感谢您对 Doris 及其周边项目感兴趣,我们非常欢迎您对 Doris 的各种建议、意见(包括批评)、评论和贡献。
+
+关于如何为 Doris 及周边项目做贡献,请前往 Doris 主库查阅 [CONTRIBUTING_CN](https://github.com/apache/incubator-doris/blob/master/CONTRIBUTING_CN.md)
diff --git a/NOTICE.txt b/NOTICE.txt
index f8c43b1..6bb64b1 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,4 +1,4 @@
-Apache Doris (incubating)
+Spark Connector for Apache Doris (incubating)
 Copyright 2018-2022 The Apache Software Foundation
 
 This product includes software developed at
diff --git a/spark-doris-connector/build.sh b/spark-doris-connector/build.sh
index 4a3d67b..14403cb 100755
--- a/spark-doris-connector/build.sh
+++ b/spark-doris-connector/build.sh
@@ -25,25 +25,38 @@
 
 set -eo pipefail
 
+ROOT=$(dirname "$0")
+ROOT=$(cd "$ROOT"; pwd)
+
+export DORIS_HOME=${ROOT}/../
+
 usage() {
   echo "
   Usage:
-    $0 spark_version scala_version
+    $0 --spark version --scala version # specify spark and scala version
+    $0 --tag                           # this is a build from tag
   e.g.:
-    $0 2.3.4 2.11
-    $0 3.1.2 2.12
+    $0 --spark 2.3.4 --scala 2.11
+    $0 --spark 3.1.2 --scala 2.12
+    $0 --tag
   "
   exit 1
 }
 
-if [ $# -ne 2 ]; then
+OPTS=$(getopt \
+  -n $0 \
+  -o '' \
+  -o 'h' \
+  -l 'spark:' \
+  -l 'scala:' \
+  -l 'tag' \
+  -- "$@")
+
+if [ $# == 0 ] ; then
     usage
 fi
 
-ROOT=$(dirname "$0")
-ROOT=$(cd "$ROOT"; pwd)
-
-export DORIS_HOME=${ROOT}/../
+eval set -- "$OPTS"
 
 . "${DORIS_HOME}"/env.sh
 
@@ -52,15 +65,32 @@ if [[ -f ${DORIS_HOME}/custom_env.sh ]]; then
     . "${DORIS_HOME}"/custom_env.sh
 fi
 
+BUILD_FROM_TAG=0
+SPARK_VERSION=0
+SCALA_VERSION=0
+while true; do
+    case "$1" in
+        --spark) SPARK_VERSION=$2 ; shift 2 ;;
+        --scala) SCALA_VERSION=$2 ; shift 2 ;;
+        --tag) BUILD_FROM_TAG=1 ; shift ;;
+        --) shift ;  break ;;
+        *) echo "Internal error" ; exit 1 ;;
+    esac
+done
 
-${MVN_BIN} clean package -Dscala.version=$2 -Dspark.version=$1
+if [[ ${BUILD_FROM_TAG} -eq 1 ]]; then
+    rm -rf ${ROOT}/output/
+    ${MVN_BIN} clean package
+else
+    rm -rf ${ROOT}/output/
+    ${MVN_BIN} clean package -Dspark.version=${SPARK_VERSION} -Dscala.version=${SCALA_VERSION}
+fi
 
-mkdir -p output/
-cp target/doris-spark-*.jar ./output/
+mkdir ${ROOT}/output/
+cp ${ROOT}/target/doris-spark-*.jar ${ROOT}/output/
 
 echo "*****************************************"
 echo "Successfully build Spark-Doris-Connector"
 echo "*****************************************"
 
 exit 0
-
diff --git a/spark-doris-connector/pom.xml b/spark-doris-connector/pom.xml
index 26d8337..492e501 100644
--- a/spark-doris-connector/pom.xml
+++ b/spark-doris-connector/pom.xml
@@ -38,9 +38,9 @@
         </license>
     </licenses>
     <scm>
-        <connection>scm:git:https://git@github.com/apache/incubator-doris.git</connection>
-        <developerConnection>scm:git:https://git@github.com/apache/incubator-doris.git</developerConnection>
-        <url>scm:git:https://git@github.com/apache/incubator-doris.git</url>
+        <connection>scm:git:https://git@github.com/apache/incubator-doris-spark-connector.git</connection>
+        <developerConnection>scm:git:https://git@github.com/apache/incubator-doris-spark-connector.git</developerConnection>
+        <url>scm:git:https://git@github.com/apache/incubator-doris-spark-connector.git</url>
         <tag>HEAD</tag>
     </scm>
     <issueManagement>
@@ -215,6 +215,19 @@
     </dependencies>
     <build>
         <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-gpg-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>sign-artifacts</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>sign</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
             <!-- add gensrc java build src dir -->
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org