From 09d4df5f69ff5d5c82ce371a29ef5eca99fd781c Mon Sep 17 00:00:00 2001 From: Davis Goodin Date: Fri, 9 Mar 2018 15:17:09 -0600 Subject: [PATCH 1/2] Add UpdateDependencies.ps1 This allows Maestro to run auto-update targets in .NET Core. --- UpdateDependencies.ps1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 UpdateDependencies.ps1 diff --git a/UpdateDependencies.ps1 b/UpdateDependencies.ps1 new file mode 100644 index 000000000000..2f0bdbcb9170 --- /dev/null +++ b/UpdateDependencies.ps1 @@ -0,0 +1,20 @@ +# +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +# This script initializes tools if necessary, then calls MSBuild using the +# dotnet CLI. This allows Maestro to run auto-update targets without +# encountering errors when contacting GitHub: .NET Core CLI supports TLS 1.2 +# by default, but full framework doesn't. + +$toolsLocalPath = Join-Path $PSScriptRoot "Tools" + +$initTools = Join-Path $PSScriptRoot "init-tools.cmd" +& $initTools + +# Execute MSBuild using the dotnet.exe host +$dotNetExe = Join-Path $toolsLocalPath "dotnetcli\dotnet.exe" +$msbuildExe = Join-Path $toolsLocalPath "msbuild.exe" +& $dotNetExe $msbuildExe $args +exit $LastExitCode From d8a823bb8ad9bc068025c45c08656a13413b37b7 Mon Sep 17 00:00:00 2001 From: Davis Goodin Date: Fri, 9 Mar 2018 18:10:30 -0600 Subject: [PATCH 2/2] Include auto-update project and target --- UpdateDependencies.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UpdateDependencies.ps1 b/UpdateDependencies.ps1 index 2f0bdbcb9170..9ba785b05de7 100644 --- a/UpdateDependencies.ps1 +++ b/UpdateDependencies.ps1 @@ -16,5 +16,6 @@ $initTools = Join-Path $PSScriptRoot "init-tools.cmd" # Execute MSBuild using the dotnet.exe host $dotNetExe = Join-Path $toolsLocalPath "dotnetcli\dotnet.exe" $msbuildExe = Join-Path $toolsLocalPath "msbuild.exe" -& $dotNetExe $msbuildExe $args +$testsBuildProj = Join-Path $PSScriptRoot "tests\build.proj" +& $dotNetExe $msbuildExe $testsBuildProj /t:UpdateDependenciesAndSubmitPullRequest $args exit $LastExitCode