Skip to content

Commit 3a15637

Browse files
author
Hovsep
committed
Merge pull request Azure#1509 from yugangw-msft/corehost
Consolidate installer building script for osx & linuix
2 parents f313688 + f39bc05 commit 3a15637

File tree

8 files changed

+28
-17
lines changed

8 files changed

+28
-17
lines changed

src/CLU/Microsoft.CLU.Run/project.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"Microsoft.NETCore": "5.0.1-beta-23516",
1010
"Microsoft.NETCore.Runtime": "1.0.1-beta-23516",
1111
"Microsoft.NETCore.Platforms": "1.0.1-beta-23516",
12-
"Microsoft.NETCore.ConsoleHost": "1.0.0-beta-23516",
1312
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.1-beta-23516",
1413
"System.Console": "4.0.0-beta-23516",
1514
"System.Diagnostics.Process": "4.1.0-beta-23516",

src/CLU/clurun/project.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"Microsoft.NETCore": "5.0.1-beta-23516",
88
"Microsoft.NETCore.Runtime": "1.0.1-beta-23516",
99
"Microsoft.NETCore.Platforms": "1.0.1-beta-23516",
10-
"Microsoft.NETCore.ConsoleHost": "1.0.0-beta-23516",
1110
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.1-beta-23516",
1211
"System.Console": "4.0.0-beta-23516",
1312
"System.Diagnostics.Process": "4.1.0-beta-23516",

tools/CLU/BuildAndInstallClu.bat

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,20 @@ REM note, for known nuget bugs, skip --install by copying over cmdlet packages.
2929
xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\osx.10.10-x64\pkgs /S /Q /I /Y
3030
copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\osx.10.10-x64
3131
copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\osx.10.10-x64
32+
33+
REM: copy over the pre-cooked azure.sh and ensure correct line endings
3234
copy /Y %~dp0\azure.sh %root%\drop\clurun\osx.10.10-x64
35+
set azuresh=%root%\drop\clurun\osx.10.10-x64\azure.sh
36+
echo Get-ChildItem %azuresh% ^| ForEach-Object { > %temp%\fixLineEndings.ps1
37+
echo $contents = [IO.File]::ReadAllText($_) -replace "`r`n?", "`n" >> %temp%\fixLineEndings.ps1
38+
echo [IO.File]::WriteAllText($_, $contents) >> %temp%\fixLineEndings.ps1
39+
echo } >> %temp%\fixLineEndings.ps1
40+
@powershell -file %temp%\fixLineEndings.ps1
3341

3442
xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\ubuntu.14.04-x64\pkgs /S /Q /I /Y
3543
copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\ubuntu.14.04-x64
3644
copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\ubuntu.14.04-x64
37-
copy /Y %~dp0\azure.sh %root%\drop\clurun\ubuntu.14.04-x64
45+
copy /Y %azuresh% %root%\drop\clurun\ubuntu.14.04-x64
3846

39-
copy /Y %~dp0\azure %root%\drop\clurun\win7-x64
47+
REM, windows version also needs it for bash based testing
48+
copy /Y %azuresh% %root%\drop\clurun\win7-x64\azure

tools/CLU/BuildDrop.ps1

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ if (!($dropLocation))
1717
if (!(Test-Path -Path $dropLocation -PathType Container))
1818
{
1919
mkdir "$dropLocation"
20+
}
21+
22+
if (!(Test-Path -Path "$dropLocation\CommandRepo" -PathType Container))
23+
{
2024
mkdir "$dropLocation\CommandRepo"
25+
}
26+
27+
if (!(Test-Path -Path "$dropLocation\clurun" -PathType Container))
28+
{
2129
mkdir "$dropLocation\clurun"
2230
}
2331

@@ -50,8 +58,8 @@ if (!($excludeCluRun))
5058

5159
if (!($runtime.StartsWith("win")))
5260
{
53-
# Fix current x-plat dotnet publish by correctly renaming ConsoleHost to clurun
54-
Move-Item -Path "$cluRunOutput\coreconsole" -Destination "$cluRunOutput\clurun" -Force
61+
# use released coreconsole file from https://github.com/dotnet/cli
62+
Copy-Item -Path "$workspaceDirectory\tools\CLU\$runtime\coreconsole" -Destination "$cluRunOutput\clurun" -Force
5563

5664
# Remove all extra exes that end up in the output directory...
5765
Get-ChildItem -Path "$cluRunOutput" -Filter "*.exe" | Remove-Item

tools/CLU/BuildPackage.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
if (!(Test-Path $cmdletsDir))
44
{
5-
throw "cmdletsDir: '$cmdletsDir' must be an existing directory containing cmdlet code"
5+
throw "cmdletsDir: '$cmdletsDir' must be an existing directory containing cmdlet code"
66
}
77
if (!(Test-Path $outputDir))
88
{
9-
throw "outputDir: '$outputDir' must be an existing directory"
9+
throw "outputDir: '$outputDir' must be an existing directory"
1010
}
1111

1212
if ([string]::IsNullOrWhiteSpace($env:WORKSPACE) -or !(Test-Path $env:WORKSPACE))
1313
{
14-
throw "env:WORKSPACE: '$env:WORKSPACE' must be an existing directory"
14+
throw "env:WORKSPACE: '$env:WORKSPACE' must be an existing directory"
1515
}
1616

1717
$packageSource = $packageSource.TrimEnd('\\')
@@ -34,19 +34,19 @@ $contentFileText = ""
3434
$contentFiles | %{ $contentFileText += (" <file src=""" + $_.Name + """ target=""content""/>`r`n")}
3535
if ($packageId -ne "Microsoft.CLU.Commands")
3636
{
37-
$contentFileText += " <file src=""content\azure.lx"" target=""content""/>`r`n"
37+
$contentFileText += " <file src=""content\azure.lx"" target=""content""/>`r`n"
3838
}
3939
if ($renameFileExists)
4040
{
41-
$contentFileText += " <file src=""content\rename.cfg"" target=""content""/>`r`n"
41+
$contentFileText += " <file src=""content\rename.cfg"" target=""content""/>`r`n"
4242
}
4343
$contentFileText += " <file src=""content\package.cfg"" target=""content""/>`r`n"
4444
$sourceFileText = ""
4545
$refFiles | %{$sourceFileText += (" <file src=""" + $_.Name + """ target=""lib\dnxcore50""/>`r`n")}
4646
$outputContent = $fileContent -replace "%PackageVersion%", $packageVersion
4747
$outputContent = $outputContent -replace "%ReferenceFiles%", $refFileText
48-
$outputContent = $outputContent -replace "%SourceFiles%", $sourceFileText
49-
$outputContent = $outputContent -replace "%ContentFiles%", $contentFileText
48+
$outputContent = $outputContent -replace "%SourceFiles%", $sourceFileText
49+
$outputContent = $outputContent -replace "%ContentFiles%", $contentFileText
5050
Set-Content -Value $outputContent -Path $nuspecOutput
5151

5252
Write-Host "Creating nuget package..."

tools/CLU/azure

Lines changed: 0 additions & 4 deletions
This file was deleted.

tools/CLU/osx.10.10-x64/coreconsole

21.7 KB
Binary file not shown.
24.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)