Merge pull request #1321 from dotnet/pakrym/package-fix

Fix location for package signing
This commit is contained in:
Pavel Krymets 2016-02-09 14:38:31 -08:00
commit 5c3bc7f340
3 changed files with 11 additions and 5 deletions

View file

@ -24,7 +24,7 @@ New-Item -ItemType Directory -Force -Path $IntermediatePackagesDir
foreach ($ProjectName in $ProjectsToPack) {
$ProjectFile = "$RepoRoot\src\$ProjectName\project.json"
& $toolsDir\dotnet pack "$ProjectFile" --build-base-path "$CompilationOutputDir\forPackaging" --output "$IntermediatePackagesDir" --configuration "$Configuration" $versionArg $versionSuffix
& $toolsDir\dotnet pack "$ProjectFile" --no-build --build-base-path "$Stage2CompilationDir\forPackaging" --output "$IntermediatePackagesDir" --configuration "$Configuration" $versionArg $versionSuffix
if (!$?) {
Write-Host "$toolsDir\dotnet pack failed for: $ProjectFile"
Exit 1

View file

@ -17,9 +17,9 @@ _ "$RepoRoot\scripts\compile\compile-stage.ps1" @("$Tfm","$Rid","$Configuration"
. $REPOROOT\scripts\package\projectsToPack.ps1
$ProjectsToPack | ForEach-Object {
dotnet build --build-base-path "$Stage2Dir\forPackaging" --configuration "$Configuration" "$RepoRoot\src\$_"
dotnet build --build-base-path "$Stage2CompilationDir\forPackaging" --configuration "$Configuration" "$RepoRoot\src\$_"
if (!$?) {
Write-Host Command failed: dotnet build --native-subdirectory --build-base-path "$Stage2Dir\forPackaging" --configuration "$Configuration" "$RepoRoot\src\$_"
Write-Host Command failed: dotnet build --native-subdirectory --build-base-path "$Stage2CompilationDir\forPackaging" --configuration "$Configuration" "$RepoRoot\src\$_"
exit 1
}
}

View file

@ -24,6 +24,7 @@ namespace Microsoft.DotNet.Tools.Compiler
app.HelpOption("-h|--help");
var output = app.Option("-o|--output <OUTPUT_DIR>", "Directory in which to place outputs", CommandOptionType.SingleValue);
var noBuild = app.Option("--no-build", "Do not build project before packing", CommandOptionType.NoValue);
var buildBasePath = app.Option("-b|--build-base-path <OUTPUT_DIR>", "Directory in which to place temporary build outputs", CommandOptionType.SingleValue);
var configuration = app.Option("-c|--configuration <CONFIGURATION>", "Configuration under which to build", CommandOptionType.SingleValue);
var versionSuffix = app.Option("--version-suffix <VERSION_SUFFIX>", "Defines what `*` should be replaced with in version field in project.json", CommandOptionType.SingleValue);
@ -68,10 +69,15 @@ namespace Microsoft.DotNet.Tools.Compiler
var project = contexts.First().ProjectFile;
var artifactPathsCalculator = new ArtifactPathsCalculator(project, buildBasePathValue, outputValue, configValue);
var buildProjectCommand = new BuildProjectCommand(project, artifactPathsCalculator, buildBasePathValue, configValue);
var packageBuilder = new PackagesGenerator(contexts, artifactPathsCalculator, configValue);
var buildResult = buildProjectCommand.Execute();
int buildResult = 0;
if (!noBuild.HasValue())
{
var buildProjectCommand = new BuildProjectCommand(project, artifactPathsCalculator, buildBasePathValue, configValue);
buildResult = buildProjectCommand.Execute();
}
return buildResult != 0 ? buildResult : packageBuilder.Build();
});