You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2015/07/24 18:08:58 UTC

spark git commit: [SPARK-9250] Make change-scala-version more helpful w.r.t. valid Scala versions

Repository: spark
Updated Branches:
  refs/heads/master 846cf4628 -> 428cde5d1


[SPARK-9250] Make change-scala-version more helpful w.r.t. valid Scala versions

Author: François Garillot <fr...@garillot.net>

Closes #7595 from huitseeker/issue/SPARK-9250 and squashes the following commits:

80a0218 [François Garillot] [SPARK-9250] Make change-scala-version's usage more explicit, introduce a -h|--help option.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/428cde5d
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/428cde5d
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/428cde5d

Branch: refs/heads/master
Commit: 428cde5d1c46adad344255447283dfb9716d65cb
Parents: 846cf46
Author: François Garillot <fr...@garillot.net>
Authored: Fri Jul 24 17:09:33 2015 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Fri Jul 24 17:09:33 2015 +0100

----------------------------------------------------------------------
 dev/change-scala-version.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/428cde5d/dev/change-scala-version.sh
----------------------------------------------------------------------
diff --git a/dev/change-scala-version.sh b/dev/change-scala-version.sh
index b81c00c..d7975df 100755
--- a/dev/change-scala-version.sh
+++ b/dev/change-scala-version.sh
@@ -19,19 +19,23 @@
 
 set -e
 
+VALID_VERSIONS=( 2.10 2.11 )
+
 usage() {
-  echo "Usage: $(basename $0) <version>" 1>&2
+  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 ]; then
+if [[ ($# -ne 1) || ( $1 == "--help") ||  $1 == "-h" ]]; then
   usage
 fi
 
 TO_VERSION=$1
 
-VALID_VERSIONS=( 2.10 2.11 )
-
 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


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