You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2020/02/26 22:42:10 UTC

[spark] branch branch-3.0 updated: [MINOR][BUILD] Fix make-distribution.sh to show usage without 'echo' cmd

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

dongjoon pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 20e0e8d  [MINOR][BUILD] Fix make-distribution.sh to show usage without 'echo' cmd
20e0e8d is described below

commit 20e0e8d596ddd9d612cd4e4d12ac1bef99851230
Author: Kent Yao <ya...@hotmail.com>
AuthorDate: Wed Feb 26 14:40:32 2020 -0800

    [MINOR][BUILD] Fix make-distribution.sh to show usage without 'echo' cmd
    
    ### What changes were proposed in this pull request?
    
    turn off `x` mode and do not print the command while printing usage of `make-distribution.sh`
    
    ### Why are the changes needed?
    
    improve dev tools
    
    ### Does this PR introduce any user-facing change?
    
    for only developers, clearer hints
    
    #### after
    ```
    ./dev/make-distribution.sh --hel
    +++ dirname ./dev/make-distribution.sh
    ++ cd ./dev/..
    ++ pwd
    + SPARK_HOME=/Users/kentyao/spark
    + DISTDIR=/Users/kentyao/spark/dist
    + MAKE_TGZ=false
    + MAKE_PIP=false
    + MAKE_R=false
    + NAME=none
    + MVN=/Users/kentyao/spark/build/mvn
    + ((  1  ))
    + case $1 in
    + echo 'Error: --hel is not supported'
    Error: --hel is not supported
    + exit_with_usage
    + set +x
    make-distribution.sh - tool for making binary distributions of Spark
    
    usage:
    make-distribution.sh [--name] [--tgz] [--pip] [--r] [--mvn <mvn-command>] <maven build options>
    See Spark's "Building Spark" doc for correct Maven options.
    ```
    
    #### before
    ```
    +++ dirname ./dev/make-distribution.sh
    ++ cd ./dev/..
    ++ pwd
    + SPARK_HOME=/Users/kentyao/spark
    + DISTDIR=/Users/kentyao/spark/dist
    + MAKE_TGZ=false
    + MAKE_PIP=false
    + MAKE_R=false
    + NAME=none
    + MVN=/Users/kentyao/spark/build/mvn
    + ((  1  ))
    + case $1 in
    + echo 'Error: --hel is not supported'
    Error: --hel is not supported
    + exit_with_usage
    + echo 'make-distribution.sh - tool for making binary distributions of Spark'
    make-distribution.sh - tool for making binary distributions of Spark
    + echo ''
    
    + echo usage:
    usage:
    + cl_options='[--name] [--tgz] [--pip] [--r] [--mvn <mvn-command>]'
    + echo 'make-distribution.sh [--name] [--tgz] [--pip] [--r] [--mvn <mvn-command>] <maven build options>'
    make-distribution.sh [--name] [--tgz] [--pip] [--r] [--mvn <mvn-command>] <maven build options>
    + echo 'See Spark'\''s "Building Spark" doc for correct Maven options.'
    See Spark's "Building Spark" doc for correct Maven options.
    + echo ''
    
    + exit 1
    ```
    
    ### How was this patch tested?
    
    manually
    
    Closes #27706 from yaooqinn/build.
    
    Authored-by: Kent Yao <ya...@hotmail.com>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
    (cherry picked from commit a6026c830a582af75a0d95d18f7759922a086334)
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 dev/make-distribution.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh
index 0b30eec..9e767ce 100755
--- a/dev/make-distribution.sh
+++ b/dev/make-distribution.sh
@@ -39,6 +39,7 @@ NAME=none
 MVN="$SPARK_HOME/build/mvn"
 
 function exit_with_usage {
+  set +x
   echo "make-distribution.sh - tool for making binary distributions of Spark"
   echo ""
   echo "usage:"


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