Skip to content

Consolidate installer building script for osx & linuix #1509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/CLU/Microsoft.CLU.Run/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/CLU/clurun/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 11 additions & 2 deletions tools/CLU/BuildAndInstallClu.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 10 additions & 2 deletions tools/CLU/BuildDrop.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions tools/CLU/BuildPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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('\\')
Expand All @@ -34,19 +34,19 @@ $contentFileText = ""
$contentFiles | %{ $contentFileText += (" <file src=""" + $_.Name + """ target=""content""/>`r`n")}
if ($packageId -ne "Microsoft.CLU.Commands")
{
$contentFileText += " <file src=""content\azure.lx"" target=""content""/>`r`n"
$contentFileText += " <file src=""content\azure.lx"" target=""content""/>`r`n"
}
if ($renameFileExists)
{
$contentFileText += " <file src=""content\rename.cfg"" target=""content""/>`r`n"
$contentFileText += " <file src=""content\rename.cfg"" target=""content""/>`r`n"
}
$contentFileText += " <file src=""content\package.cfg"" target=""content""/>`r`n"
$sourceFileText = ""
$refFiles | %{$sourceFileText += (" <file src=""" + $_.Name + """ target=""lib\dnxcore50""/>`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..."
Expand Down
4 changes: 0 additions & 4 deletions tools/CLU/azure

This file was deleted.

Binary file added tools/CLU/osx.10.10-x64/coreconsole
Binary file not shown.
Binary file added tools/CLU/ubuntu.14.04-x64/coreconsole
Binary file not shown.