diff --git a/src/CLU/Microsoft.CLU.Run/project.json b/src/CLU/Microsoft.CLU.Run/project.json index e505e09d2a3c..7816d770b9db 100644 --- a/src/CLU/Microsoft.CLU.Run/project.json +++ b/src/CLU/Microsoft.CLU.Run/project.json @@ -9,7 +9,6 @@ "Microsoft.NETCore": "5.0.1-beta-23516", "Microsoft.NETCore.Runtime": "1.0.1-beta-23516", "Microsoft.NETCore.Platforms": "1.0.1-beta-23516", - "Microsoft.NETCore.ConsoleHost": "1.0.0-beta-23516", "Microsoft.NETCore.Runtime.CoreCLR": "1.0.1-beta-23516", "System.Console": "4.0.0-beta-23516", "System.Diagnostics.Process": "4.1.0-beta-23516", diff --git a/src/CLU/clurun/project.json b/src/CLU/clurun/project.json index 795e22f30df1..2794647e986e 100644 --- a/src/CLU/clurun/project.json +++ b/src/CLU/clurun/project.json @@ -7,7 +7,6 @@ "Microsoft.NETCore": "5.0.1-beta-23516", "Microsoft.NETCore.Runtime": "1.0.1-beta-23516", "Microsoft.NETCore.Platforms": "1.0.1-beta-23516", - "Microsoft.NETCore.ConsoleHost": "1.0.0-beta-23516", "Microsoft.NETCore.Runtime.CoreCLR": "1.0.1-beta-23516", "System.Console": "4.0.0-beta-23516", "System.Diagnostics.Process": "4.1.0-beta-23516", diff --git a/tools/CLU/BuildAndInstallClu.bat b/tools/CLU/BuildAndInstallClu.bat index 4d4ae2c99a16..b173cdf374f9 100644 --- a/tools/CLU/BuildAndInstallClu.bat +++ b/tools/CLU/BuildAndInstallClu.bat @@ -29,11 +29,20 @@ REM note, for known nuget bugs, skip --install by copying over cmdlet packages. xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\osx.10.10-x64\pkgs /S /Q /I /Y copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\osx.10.10-x64 copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\osx.10.10-x64 + +REM: copy over the pre-cooked azure.sh and ensure correct line endings copy /Y %~dp0\azure.sh %root%\drop\clurun\osx.10.10-x64 +set azuresh=%root%\drop\clurun\osx.10.10-x64\azure.sh +echo Get-ChildItem %azuresh% ^| ForEach-Object { > %temp%\fixLineEndings.ps1 +echo $contents = [IO.File]::ReadAllText($_) -replace "`r`n?", "`n" >> %temp%\fixLineEndings.ps1 +echo [IO.File]::WriteAllText($_, $contents) >> %temp%\fixLineEndings.ps1 +echo } >> %temp%\fixLineEndings.ps1 +@powershell -file %temp%\fixLineEndings.ps1 xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\ubuntu.14.04-x64\pkgs /S /Q /I /Y copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\ubuntu.14.04-x64 copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\ubuntu.14.04-x64 -copy /Y %~dp0\azure.sh %root%\drop\clurun\ubuntu.14.04-x64 +copy /Y %azuresh% %root%\drop\clurun\ubuntu.14.04-x64 -copy /Y %~dp0\azure %root%\drop\clurun\win7-x64 +REM, windows version also needs it for bash based testing +copy /Y %azuresh% %root%\drop\clurun\win7-x64\azure diff --git a/tools/CLU/BuildDrop.ps1 b/tools/CLU/BuildDrop.ps1 index 7e0dfc822340..325cc5450624 100644 --- a/tools/CLU/BuildDrop.ps1 +++ b/tools/CLU/BuildDrop.ps1 @@ -17,7 +17,15 @@ if (!($dropLocation)) if (!(Test-Path -Path $dropLocation -PathType Container)) { mkdir "$dropLocation" +} + +if (!(Test-Path -Path "$dropLocation\CommandRepo" -PathType Container)) +{ mkdir "$dropLocation\CommandRepo" +} + +if (!(Test-Path -Path "$dropLocation\clurun" -PathType Container)) +{ mkdir "$dropLocation\clurun" } @@ -50,8 +58,8 @@ if (!($excludeCluRun)) if (!($runtime.StartsWith("win"))) { - # Fix current x-plat dotnet publish by correctly renaming ConsoleHost to clurun - Move-Item -Path "$cluRunOutput\coreconsole" -Destination "$cluRunOutput\clurun" -Force + # use released coreconsole file from https://github.com/dotnet/cli + Copy-Item -Path "$workspaceDirectory\tools\CLU\$runtime\coreconsole" -Destination "$cluRunOutput\clurun" -Force # Remove all extra exes that end up in the output directory... Get-ChildItem -Path "$cluRunOutput" -Filter "*.exe" | Remove-Item diff --git a/tools/CLU/BuildPackage.ps1 b/tools/CLU/BuildPackage.ps1 index 6beefbc67529..d9a60cfcd634 100644 --- a/tools/CLU/BuildPackage.ps1 +++ b/tools/CLU/BuildPackage.ps1 @@ -2,16 +2,16 @@ if (!(Test-Path $cmdletsDir)) { - throw "cmdletsDir: '$cmdletsDir' must be an existing directory containing cmdlet code" + throw "cmdletsDir: '$cmdletsDir' must be an existing directory containing cmdlet code" } if (!(Test-Path $outputDir)) { - throw "outputDir: '$outputDir' must be an existing directory" + throw "outputDir: '$outputDir' must be an existing directory" } if ([string]::IsNullOrWhiteSpace($env:WORKSPACE) -or !(Test-Path $env:WORKSPACE)) { - throw "env:WORKSPACE: '$env:WORKSPACE' must be an existing directory" + throw "env:WORKSPACE: '$env:WORKSPACE' must be an existing directory" } $packageSource = $packageSource.TrimEnd('\\') @@ -34,19 +34,19 @@ $contentFileText = "" $contentFiles | %{ $contentFileText += (" `r`n")} if ($packageId -ne "Microsoft.CLU.Commands") { - $contentFileText += " `r`n" + $contentFileText += " `r`n" } if ($renameFileExists) { - $contentFileText += " `r`n" + $contentFileText += " `r`n" } $contentFileText += " `r`n" $sourceFileText = "" $refFiles | %{$sourceFileText += (" `r`n")} $outputContent = $fileContent -replace "%PackageVersion%", $packageVersion $outputContent = $outputContent -replace "%ReferenceFiles%", $refFileText - $outputContent = $outputContent -replace "%SourceFiles%", $sourceFileText - $outputContent = $outputContent -replace "%ContentFiles%", $contentFileText +$outputContent = $outputContent -replace "%SourceFiles%", $sourceFileText +$outputContent = $outputContent -replace "%ContentFiles%", $contentFileText Set-Content -Value $outputContent -Path $nuspecOutput Write-Host "Creating nuget package..." diff --git a/tools/CLU/azure b/tools/CLU/azure deleted file mode 100644 index 9b47ed34a551..000000000000 --- a/tools/CLU/azure +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -BASEDIR=$(dirname $0) - -clurun.exe -s azure -r $BASEDIR/azure.lx $* \ No newline at end of file diff --git a/tools/CLU/osx.10.10-x64/coreconsole b/tools/CLU/osx.10.10-x64/coreconsole new file mode 100644 index 000000000000..f9058ac8ec0e Binary files /dev/null and b/tools/CLU/osx.10.10-x64/coreconsole differ diff --git a/tools/CLU/ubuntu.14.04-x64/coreconsole b/tools/CLU/ubuntu.14.04-x64/coreconsole new file mode 100644 index 000000000000..a502adaab0f9 Binary files /dev/null and b/tools/CLU/ubuntu.14.04-x64/coreconsole differ