From 960a97b262eec45d5b461dad6565e50e51256b30 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Tue, 22 Oct 2024 07:22:41 +0800 Subject: [PATCH 1/3] Update .mill-version --- .mill-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mill-version b/.mill-version index 1a77547..53cf705 100644 --- a/.mill-version +++ b/.mill-version @@ -1 +1 @@ -0.11.11 +0.12.0-RC3-102-b8217f From 6e0ce2fb61096b4a50cf5bbad37c50abd843869c Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Tue, 22 Oct 2024 07:32:38 +0800 Subject: [PATCH 2/3] . --- mill | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/mill b/mill index 6621855..d03a045 100755 --- a/mill +++ b/mill @@ -3,13 +3,18 @@ # This is a wrapper script, that automatically download mill from GitHub release pages # You can give the required mill version with MILL_VERSION env variable # If no version is given, it falls back to the value of DEFAULT_MILL_VERSION -DEFAULT_MILL_VERSION=0.11.7-29-f2e220 set -e +if [ -z "${DEFAULT_MILL_VERSION}" ] ; then + DEFAULT_MILL_VERSION=0.11.12 +fi + if [ -z "$MILL_VERSION" ] ; then if [ -f ".mill-version" ] ; then MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)" + elif [ -f ".config/mill-version" ] ; then + MILL_VERSION="$(head -n 1 .config/mill-version 2> /dev/null)" elif [ -f "mill" ] && [ "$0" != "mill" ] ; then MILL_VERSION=$(grep -F "DEFAULT_MILL_VERSION=" "mill" | head -n 1 | cut -d= -f2) else @@ -35,7 +40,7 @@ if [ ! -s "$MILL_EXEC_PATH" ] ; then fi DOWNLOAD_FILE=$MILL_EXEC_PATH-tmp-download MILL_VERSION_TAG=$(echo $MILL_VERSION | sed -E 's/([^-]+)(-M[0-9]+)?(-.*)?/\1\2/') - MILL_DOWNLOAD_URL="https://github.com/lihaoyi/mill/releases/download/${MILL_VERSION_TAG}/$MILL_VERSION${ASSEMBLY}" + MILL_DOWNLOAD_URL="https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/$MILL_VERSION/mill-dist-$MILL_VERSION.jar" curl --fail -L -o "$DOWNLOAD_FILE" "$MILL_DOWNLOAD_URL" chmod +x "$DOWNLOAD_FILE" mv "$DOWNLOAD_FILE" "$MILL_EXEC_PATH" @@ -43,7 +48,20 @@ if [ ! -s "$MILL_EXEC_PATH" ] ; then unset MILL_DOWNLOAD_URL fi +if [ -z "$MILL_MAIN_CLI" ] ; then + MILL_MAIN_CLI="${0}" +fi + +MILL_FIRST_ARG="" + + # first arg is a long flag for "--interactive" or starts with "-i" +if [ "$1" = "--bsp" ] || [ "${1#"-i"}" != "$1" ] || [ "$1" = "--interactive" ] || [ "$1" = "--no-server" ] || [ "$1" = "--repl" ] || [ "$1" = "--help" ] ; then + # Need to preserve the first position of those listed options + MILL_FIRST_ARG=$1 + shift +fi + unset MILL_DOWNLOAD_PATH unset MILL_VERSION -exec $MILL_EXEC_PATH "$@" +exec $MILL_EXEC_PATH $MILL_FIRST_ARG -D "mill.main.cli=${MILL_MAIN_CLI}" "$@" From 374fbd1a10cf82c299c2e42e58812a8d5fd75a66 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Thu, 24 Oct 2024 07:28:33 +0800 Subject: [PATCH 3/3] Update .mill-version --- .mill-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mill-version b/.mill-version index 53cf705..ac454c6 100644 --- a/.mill-version +++ b/.mill-version @@ -1 +1 @@ -0.12.0-RC3-102-b8217f +0.12.0