From c91c7984c908d05e1a2a4cc414a5c97fc40eb13c Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Wed, 30 May 2018 19:53:35 +0800 Subject: [PATCH 1/7] Bump sbt version --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index c091b86ca..133a8f197 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=0.13.17 From 67fec3812c69e8cb4cd26bb59673dbe6fb023537 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Wed, 30 May 2018 19:55:03 +0800 Subject: [PATCH 2/7] Bump license year --- LICENSE.txt | 2 +- src/debian/usr/share/doc/sbt/copyright | 2 +- src/linux/usr/share/doc/sbt/copyright | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 7f3a9b61e..563beedc6 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ // Generated from http://www.opensource.org/licenses/bsd-license.php -Copyright (c) 2011 - 2017, Paul Phillips, Lightbend, and other contributors. +Copyright (c) 2011 - 2018, Paul Phillips, Lightbend, and other contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/src/debian/usr/share/doc/sbt/copyright b/src/debian/usr/share/doc/sbt/copyright index 53987e201..f05b46cfb 100644 --- a/src/debian/usr/share/doc/sbt/copyright +++ b/src/debian/usr/share/doc/sbt/copyright @@ -10,7 +10,7 @@ https://github.com/sbt/sbt-launcher-package The entire code base may be distributed under the terms of the BSD license, which appears immediately below. -Copyright (c) 2011 - 2017, Paul Phillips, Lightbend, and other contributors. +Copyright (c) 2011 - 2018, Paul Phillips, Lightbend, and other contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/src/linux/usr/share/doc/sbt/copyright b/src/linux/usr/share/doc/sbt/copyright index 53987e201..f05b46cfb 100644 --- a/src/linux/usr/share/doc/sbt/copyright +++ b/src/linux/usr/share/doc/sbt/copyright @@ -10,7 +10,7 @@ https://github.com/sbt/sbt-launcher-package The entire code base may be distributed under the terms of the BSD license, which appears immediately below. -Copyright (c) 2011 - 2017, Paul Phillips, Lightbend, and other contributors. +Copyright (c) 2011 - 2018, Paul Phillips, Lightbend, and other contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: From bc8ed20787af6a24ef22354363e7e8dd57d528a0 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Wed, 30 May 2018 22:46:28 +0800 Subject: [PATCH 3/7] Show default sbt memory size: 1024m --- src/universal/bin/sbt | 4 ++-- src/universal/bin/sbt-launch-lib.bash | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/universal/bin/sbt b/src/universal/bin/sbt index 9070dab7c..8b236bfa9 100755 --- a/src/universal/bin/sbt +++ b/src/universal/bin/sbt @@ -69,7 +69,7 @@ declare -r win_sbt_opts_file="${sbt_home}/conf/sbtconfig.txt" usage() { cat < path to global settings/plugins directory (default: ~/.sbt) -sbt-boot path to shared boot directory (default: ~/.sbt/boot in 0.11 series) -ivy path to local Ivy repository (default: ~/.ivy2) - -mem set memory options (default: $sbt_mem, which is $(get_mem_opts $sbt_mem)) + -mem set memory options (default: $sbt_default_mem, which is $(get_mem_opts)) -no-share use all local caches; no sharing -no-global uses global caches, but does not use global ~/.sbt directory. -jvm-debug Turn on JVM debugging, open at the given port. diff --git a/src/universal/bin/sbt-launch-lib.bash b/src/universal/bin/sbt-launch-lib.bash index 2a106a225..3be1f7e3d 100755 --- a/src/universal/bin/sbt-launch-lib.bash +++ b/src/universal/bin/sbt-launch-lib.bash @@ -13,6 +13,7 @@ declare -a sbt_commands declare java_cmd=java declare java_version declare init_sbt_version=_to_be_replaced +declare sbt_default_mem=1024 declare SCRIPT=$0 while [ -h "$SCRIPT" ] ; do @@ -101,7 +102,7 @@ get_mem_opts () { else # a ham-fisted attempt to move some memory settings in concert # so they need not be messed around with individually. - local mem=${1:-1024} + local mem=${1:-$sbt_default_mem} local codecache=$(( $mem / 8 )) (( $codecache > 128 )) || codecache=128 (( $codecache < 512 )) || codecache=512 From 46783d0cf5451432718f14ae6f8e3c2315abaa6c Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Wed, 30 May 2018 22:58:30 +0800 Subject: [PATCH 4/7] Update current `sbt -help` --- README.md | 73 ++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 31b42a8cd..29bc8962c 100644 --- a/README.md +++ b/README.md @@ -42,48 +42,45 @@ well as a snapshot version of scala, then run the sbt "about" command. [info] sbt, sbt plugins, and build definitions are using Scala 2.9.1 Current -help output: +```bash +Usage: sbt [options] - Usage: sbt [options] + -h | -help print this message + -v | -verbose this runner is chattier + -d | -debug set sbt log level to debug + -no-colors disable ANSI color codes + -sbt-create start sbt even if current directory contains no sbt project + -sbt-dir path to global settings/plugins directory (default: ~/.sbt) + -sbt-boot path to shared boot directory (default: ~/.sbt/boot in 0.11 series) + -ivy path to local Ivy repository (default: ~/.ivy2) + -mem set memory options (default: 1024, which is -Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -XX:MaxMetaspaceSize=256m) + -no-share use all local caches; no sharing + -no-global uses global caches, but does not use global ~/.sbt directory. + -jvm-debug Turn on JVM debugging, open at the given port. + -batch Disable interactive mode - -h | -help print this message - -v | -verbose this runner is chattier - -d | -debug set sbt log level to debug - -no-colors disable ANSI color codes - -sbt-create start sbt even if current directory contains no sbt project - -sbt-dir path to global settings/plugins directory (default: ~/.sbt) - -sbt-boot path to shared boot directory (default: ~/.sbt/boot in 0.11 series) - -ivy path to local Ivy repository (default: ~/.ivy2) - -mem set memory options (default: 1536, which is -Xms1536m -Xmx1536m -XX:MaxPermSize=384m -XX:ReservedCodeCacheSize=192m) - -no-share use all local caches; no sharing - -offline put sbt in offline mode - -jvm-debug Turn on JVM debugging, open at the given port. + # sbt version (default: from project/build.properties if present, else latest release) + -sbt-version use the specified version of sbt + -sbt-jar use the specified jar as the sbt launcher + -sbt-rc use an RC version of sbt + -sbt-snapshot use a snapshot version of sbt - # sbt version (default: from project/build.properties if present, else latest release) - -sbt-version use the specified version of sbt - -sbt-jar use the specified jar as the sbt launcher - -sbt-rc use an RC version of sbt - -sbt-snapshot use a snapshot version of sbt - - # scala version (default: latest release) - -28 use 2.8.2 - -29 use 2.9.1 - -210 use 2.10.0-SNAPSHOT - -scala-home use the scala build at the specified directory - -scala-version use the specified version of scala - - # java version (default: java from PATH, currently java version "1.6.0_29") - -java-home alternate JAVA_HOME - - # jvm options and output control - JAVA_OPTS environment variable, if unset uses "-Dfile.encoding=UTF8" - SBT_OPTS environment variable, if unset uses "-XX:+CMSClassUnloadingEnabled" - .sbtopts if this file exists in the sbt root, it is prepended to the runner args - -Dkey=val pass -Dkey=val directly to the java runtime - -J-X pass option -X directly to the java runtime (-J is stripped) - - In the case of duplicated or conflicting options, the order above - shows precedence: JAVA_OPTS lowest, command line options highest. + # java version (default: java from PATH, currently openjdk version "1.8.0_172") + -java-home alternate JAVA_HOME + # jvm options and output control + JAVA_OPTS environment variable, if unset uses "" + .jvmopts if this file exists in the current directory, its contents + are appended to JAVA_OPTS + SBT_OPTS environment variable, if unset uses "" + .sbtopts if this file exists in the current directory, its contents + are prepended to the runner args + /usr/local/etc/sbtopts if this file exists, it is prepended to the runner args + -Dkey=val pass -Dkey=val directly to the java runtime + -J-X pass option -X directly to the java runtime + (-J is stripped) + -S-X add -X to sbt's scalacOptions (-S is stripped) +``` ## Native Packages ## From 1277e55c29002962e24f9d48dcfc875f623d128e Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Wed, 30 May 2018 22:37:25 +0800 Subject: [PATCH 5/7] Fix `sbt -help` throw `syntax error` --- src/universal/bin/sbt-launch-lib.bash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/universal/bin/sbt-launch-lib.bash b/src/universal/bin/sbt-launch-lib.bash index 3be1f7e3d..e7155a148 100755 --- a/src/universal/bin/sbt-launch-lib.bash +++ b/src/universal/bin/sbt-launch-lib.bash @@ -107,6 +107,9 @@ get_mem_opts () { (( $codecache > 128 )) || codecache=128 (( $codecache < 512 )) || codecache=512 local class_metadata_size=$(( $codecache * 2 )) + if [[ -z $java_version ]]; then + java_version=$(jdk_version) + fi local class_metadata_opt=$((( $java_version < 8 )) && echo "MaxPermSize" || echo "MaxMetaspaceSize") local arg_xms=$([[ "${java_args[@]}" == *-Xms* ]] && echo "" || echo "-Xms${mem}m") From 50886976134b28fc564d3eb4f8436079c8b6cb16 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Wed, 30 May 2018 23:20:09 +0800 Subject: [PATCH 6/7] Add build status of AppVeyor --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 29bc8962c..02c9d90f2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Build Status [![Build Status](https://travis-ci.org/sbt/sbt-launcher-package.svg?branch=master)](https://travis-ci.org/sbt/sbt-launcher-package) +[![Build Status](https://ci.appveyor.com/api/projects/status/github/sbt/sbt-launcher-package?branch=master&svg=true&retina=true)](https://ci.appveyor.com/project/sbt/sbt-launcher-package) sbt: the launcher ================== From 23b90f23a94efbff2205106b906cd7997cea3b43 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Thu, 31 May 2018 16:37:25 +0800 Subject: [PATCH 7/7] Use default path of `sbtopts` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 02c9d90f2..7e19fa695 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Usage: sbt [options] SBT_OPTS environment variable, if unset uses "" .sbtopts if this file exists in the current directory, its contents are prepended to the runner args - /usr/local/etc/sbtopts if this file exists, it is prepended to the runner args + /etc/sbt/sbtopts if this file exists, it is prepended to the runner args -Dkey=val pass -Dkey=val directly to the java runtime -J-X pass option -X directly to the java runtime (-J is stripped)