Fix update-dependencies.ps1 and build scripts to no longer use restore --infer-runtimes
.
Also, update-dependencies.ps1 doesn't use $PSScriptRoot everywhere. Instead use $RepoRoot.
This commit is contained in:
parent
ee7372c2a1
commit
a7fccf8508
5 changed files with 26 additions and 20 deletions
|
@ -15,7 +15,7 @@
|
||||||
"System.Reflection.TypeExtensions": "4.1.0-rc3-24123-01"
|
"System.Reflection.TypeExtensions": "4.1.0-rc3-24123-01"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"netstandard1.6": {
|
"netstandard1.5": {
|
||||||
"imports": "dnxcore50"
|
"imports": "dnxcore50"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ $env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
||||||
# Restore the build scripts
|
# Restore the build scripts
|
||||||
Write-Host "Restoring Build Script projects..."
|
Write-Host "Restoring Build Script projects..."
|
||||||
pushd "$PSScriptRoot\.."
|
pushd "$PSScriptRoot\.."
|
||||||
dotnet restore --infer-runtimes
|
dotnet restore
|
||||||
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
|
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ fi
|
||||||
echo "Restoring Build Script projects..."
|
echo "Restoring Build Script projects..."
|
||||||
(
|
(
|
||||||
cd "$DIR/.."
|
cd "$DIR/.."
|
||||||
dotnet restore --infer-runtimes
|
dotnet restore
|
||||||
)
|
)
|
||||||
|
|
||||||
# Build the builder
|
# Build the builder
|
||||||
|
|
|
@ -24,5 +24,15 @@
|
||||||
"portable-net45+win"
|
"portable-net45+win"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"runtimes": {
|
||||||
|
"win7-x64": { },
|
||||||
|
"win7-x86": { },
|
||||||
|
"osx.10.10-x64": { },
|
||||||
|
"osx.10.11-x64": { },
|
||||||
|
"ubuntu.14.04-x64": { },
|
||||||
|
"centos.7-x64": { },
|
||||||
|
"rhel.7.2-x64": { },
|
||||||
|
"debian.8-x64": { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,41 +17,37 @@ if($Help)
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$RepoRoot = "$PSScriptRoot\..\.."
|
||||||
|
$AppPath = "$PSScriptRoot"
|
||||||
|
|
||||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||||
if (!$env:DOTNET_INSTALL_DIR)
|
if (!$env:DOTNET_INSTALL_DIR)
|
||||||
{
|
{
|
||||||
$env:DOTNET_INSTALL_DIR="$PSScriptRoot\..\.dotnet_stage0\Windows\$Architecture"
|
$env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\Windows\$Architecture"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install a stage 0
|
# Install a stage 0
|
||||||
Write-Host "Installing .NET Core CLI Stage 0"
|
Write-Host "Installing .NET Core CLI Stage 0"
|
||||||
& "$PSScriptRoot\obtain\dotnet-install.ps1" -Architecture x64
|
& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Architecture x64
|
||||||
|
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
|
||||||
|
|
||||||
# Put the stage0 on the path
|
# Put the stage0 on the path
|
||||||
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
||||||
|
|
||||||
$appPath = "$PSScriptRoot\update-dependencies"
|
|
||||||
|
|
||||||
# Restore the build_projects
|
# Restore the build_projects
|
||||||
Write-Host "Restoring Microsoft.DotNet.Cli.Build.Framework..."
|
Write-Host "Restoring Build projects..."
|
||||||
pushd $PSScriptRoot\..\build_projects\Microsoft.DotNet.Cli.Build.Framework
|
pushd "$RepoRoot\build_projects"
|
||||||
dotnet restore --infer-runtimes
|
dotnet restore
|
||||||
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Restore update-dependencies
|
|
||||||
pushd $appPath
|
|
||||||
dotnet restore --infer-runtimes
|
|
||||||
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
|
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Publish the app
|
# Publish the app
|
||||||
Write-Host "Compiling App $appPath..."
|
Write-Host "Compiling App..."
|
||||||
dotnet publish "$appPath" -o "$appPath\bin" --framework netcoreapp1.0
|
dotnet publish "$AppPath" -o "$AppPath\bin" --framework netcoreapp1.0
|
||||||
if($LASTEXITCODE -ne 0) { throw "Failed to compile build scripts" }
|
if($LASTEXITCODE -ne 0) { throw "Failed to compile build scripts" }
|
||||||
|
|
||||||
# Run the app
|
# Run the app
|
||||||
Write-Host "Invoking App $appPath..."
|
Write-Host "Invoking App $AppPath..."
|
||||||
Write-Host " Configuration: $env:CONFIGURATION"
|
Write-Host " Configuration: $env:CONFIGURATION"
|
||||||
& "$appPath\bin\update-dependencies.exe" @Targets
|
& "$AppPath\bin\update-dependencies.exe" @Targets
|
||||||
if($LASTEXITCODE -ne 0) { throw "Build failed" }
|
if($LASTEXITCODE -ne 0) { throw "Build failed" }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue