restore the NoPackage switch for VSO signing build

This commit is contained in:
Andrew Stanton-Nurse 2016-02-16 11:39:17 -08:00
parent 9c7ec89392
commit 8fedd2ada3
2 changed files with 26 additions and 2 deletions

View file

@ -4,9 +4,27 @@ REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
set CI_BUILD=1
set CONFIGURATION=%1
set VERBOSE=1
CALL %~dp0..\build.cmd %2
REM Shift breaks %~dp0 so capture it first
set MY_DIR=%~dp0
REM Parse arguments
:loop
IF NOT "%1"=="" (
IF "%1"=="-NoPackage" (
SET DOTNET_BUILD_SKIP_PACKAGING=1
) ELSE IF "%CONFIGURATION%"=="" (
SET CONFIGURATION=%1
) ELSE IF "%TARGETS%"=="" (
SET TARGETS=%1
) ELSE (
SET TARGETS=%TARGETS% %1
)
SHIFT
GOTO :loop
)
CALL %MY_DIR%..\build.cmd %TARGETS%
exit /b %errorlevel%

View file

@ -14,6 +14,12 @@ namespace Microsoft.DotNet.Cli.Build
[Target(nameof(PrepareTargets.Init))]
public static BuildTargetResult Publish(BuildTargetContext c)
{
if (string.Equals(Environment.GetEnvironmentVariable("DOTNET_BUILD_SKIP_PACKAGING"), "1", StringComparison.Ordinal))
{
c.Info("Skipping packaging because DOTNET_BUILD_SKIP_PACKAGING is set");
return c.Success();
}
// NOTE(anurse): Currently, this just invokes the remaining build scripts as-is. We should port those to C# as well, but
// I want to get the merged in.