-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump scala-cli to 1.4.1 + drop old cli management (#21234)
- Loading branch information
Showing
3 changed files
with
4 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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\"") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters