From 0f0b703a0eb82c693a2f2edfe0932232ae44b10f Mon Sep 17 00:00:00 2001 From: Hamza REMMAL Date: Fri, 19 Jul 2024 13:51:35 +0200 Subject: [PATCH 1/2] Drop previous scala-cli management on windows --- dist/bin-native-overrides/cli-common-platform | 15 +------------ .../cli-common-platform.bat | 21 +------------------ project/Build.scala | 8 +------ 3 files changed, 3 insertions(+), 41 deletions(-) diff --git a/dist/bin-native-overrides/cli-common-platform b/dist/bin-native-overrides/cli-common-platform index 1a11c770f91a..49803d6282c5 100644 --- a/dist/bin-native-overrides/cli-common-platform +++ b/dist/bin-native-overrides/cli-common-platform @@ -1,16 +1,3 @@ #!/usr/bin/env bash -if [[ ${cygwin-} || ${mingw-} || ${msys-} ]]; then - SCALA_CLI_VERSION="" - # iterate through lines in VERSION_SRC - while IFS= read -r line; do - # if line starts with "version:=" then extract the version - if [[ "$line" == cli_version:=* ]]; then - SCALA_CLI_VERSION="${line#cli_version:=}" - break - fi - done < "$PROG_HOME/EXTRA_PROPERTIES" - SCALA_CLI_CMD_BASH=("\"$PROG_HOME/bin/scala-cli\"" "--cli-version \"$SCALA_CLI_VERSION\"") -else - SCALA_CLI_CMD_BASH=("\"$PROG_HOME/bin/scala-cli\"") -fi +SCALA_CLI_CMD_BASH=("\"$PROG_HOME/bin/scala-cli\"") diff --git a/dist/bin-native-overrides/cli-common-platform.bat b/dist/bin-native-overrides/cli-common-platform.bat index d1c4f1c4716b..24ab08086007 100644 --- a/dist/bin-native-overrides/cli-common-platform.bat +++ b/dist/bin-native-overrides/cli-common-platform.bat @@ -1,22 +1,3 @@ @echo off -setlocal enabledelayedexpansion - -set "_SCALA_CLI_VERSION=" -@rem read for cli_version:=_SCALA_CLI_VERSION in EXTRA_PROPERTIES file -FOR /F "usebackq delims=" %%G IN ("%_PROG_HOME%\EXTRA_PROPERTIES") DO ( - SET "line=%%G" - IF "!line:~0,13!"=="cli_version:=" ( - SET "_SCALA_CLI_VERSION=!line:~13!" - GOTO :foundCliVersion - ) -) - -@REM we didn't find it, so we should fail -echo "ERROR: cli_version not found in EXTRA_PROPERTIES file" -exit /b 1 - -:foundCliVersion -endlocal & set "SCALA_CLI_VERSION=%_SCALA_CLI_VERSION%" - -set SCALA_CLI_CMD_WIN="%_PROG_HOME%\bin\scala-cli.exe" "--cli-version" "%SCALA_CLI_VERSION%" +set SCALA_CLI_CMD_WIN="%_PROG_HOME%\bin\scala-cli.exe" diff --git a/project/Build.scala b/project/Build.scala index b329f79eaca7..be81537da8fe 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -125,8 +125,6 @@ object Build { /** Version of Scala CLI to download */ val scalaCliLauncherVersion = "1.4.0" - /** Version of Scala CLI to download (on Windows - last known validated version) */ - val scalaCliLauncherVersionWindows = "1.4.0" /** Version of Coursier to download for initializing the local maven repo of Scala command */ val coursierJarVersion = "2.1.10" @@ -2185,12 +2183,8 @@ object Build { republishBinDir := (dist / republishBinDir).value, republishBinOverrides += (dist / baseDirectory).value / "bin-native-overrides", republishFetchCoursier := (dist / republishFetchCoursier).value, - republishExtraProps += ("cli_version" -> scalaCliLauncherVersion), republishLaunchers += - ("scala-cli.exe" -> s"zip+https://github.com/VirtusLab/scala-cli/releases/download/v$scalaCliLauncherVersionWindows/scala-cli-x86_64-pc-win32.zip!/scala-cli.exe") - ) - .settings( - Universal / mappings += (republishRepo.value / "EXTRA_PROPERTIES" -> "EXTRA_PROPERTIES"), + ("scala-cli.exe" -> s"zip+https://github.com/VirtusLab/scala-cli/releases/download/v$scalaCliLauncherVersion/scala-cli-x86_64-pc-win32.zip!/scala-cli.exe") ) .settings( Windows / name := "scala", From 7695d9bae9c78c1b618c281bcd9e72e3f7ee75e8 Mon Sep 17 00:00:00 2001 From: Hamza REMMAL Date: Fri, 19 Jul 2024 13:52:18 +0200 Subject: [PATCH 2/2] Bump scala-cli to 1.4.1 --- project/Build.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Build.scala b/project/Build.scala index be81537da8fe..86b0b0d50c03 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -124,7 +124,7 @@ object Build { val mimaPreviousLTSDottyVersion = "3.3.0" /** Version of Scala CLI to download */ - val scalaCliLauncherVersion = "1.4.0" + val scalaCliLauncherVersion = "1.4.1" /** Version of Coursier to download for initializing the local maven repo of Scala command */ val coursierJarVersion = "2.1.10"