Skip to content

Commit

Permalink
Fixed manifest publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Haplois committed Jan 11, 2022
1 parent 25b0dfd commit 48b4d2a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,7 @@ function Create-NugetPackages
$uap10Nuget = $testhostUapPackageDir
}

Write-Verbose "$nugetExe pack $stagingDir\$file -OutputDirectory $packageOutputDir -Version $TPB_Version -Properties Version=$TPB_Version $additionalArgs"
Invoke-Exe $nugetExe "pack $stagingDir\$file -OutputDirectory $packageOutputDir -Version $TPB_Version -Properties Version=$TPB_Version;JsonNetVersion=$JsonNetVersion;Runtime=$TPB_TargetRuntime;NetCoreTargetFramework=$TPB_TargetFrameworkCore20;FakesPackageDir=$FakesPackageDir;NetStandard10Framework=$TPB_TargetFrameworkNS10;NetStandard13Framework=$TPB_TargetFrameworkNS13;NetStandard20Framework=$TPB_TargetFrameworkNS20;Uap10Framework=$uap10Nuget;BranchName=$TPB_BRANCH;CommitId=$TPB_COMMIT $additionalArgs"
Invoke-Exe $nugetExe "pack $stagingDir\$file -OutputDirectory $packageOutputDir -Version $TPB_Version -Properties Version=$TPB_Version``;JsonNetVersion=$JsonNetVersion``;Runtime=$TPB_TargetRuntime``;NetCoreTargetFramework=$TPB_TargetFrameworkCore20``;FakesPackageDir=$FakesPackageDir``;NetStandard10Framework=$TPB_TargetFrameworkNS10``;NetStandard13Framework=$TPB_TargetFrameworkNS13``;NetStandard20Framework=$TPB_TargetFrameworkNS20``;Uap10Framework=$uap10Nuget``;BranchName=$TPB_BRANCH``;CommitId=$TPB_COMMIT $additionalArgs"
}

# Verifies that expected number of files gets shipped in nuget packages.
Expand Down Expand Up @@ -960,6 +959,7 @@ function Locate-MSBuildPath

Write-Verbose "found msbuild : '$($msbuildPath -join "','")'"
$msBuild = $msBuildPath | Select-Object -First 1

Write-Verbose "msbuildPath is : '$($msbuildPath -join "','")'"
if ($null -eq $msBuild -or 0 -eq $msBuild.Count) {
throw "MSBuild not found."
Expand Down
10 changes: 6 additions & 4 deletions scripts/build/GenerateManifest.proj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
<MicrosoftDotNetBuildTasksFeedTaskDir>$(MicrosoftDotNetBuildTasksFeedFilePath)tools/net472/</MicrosoftDotNetBuildTasksFeedTaskDir>
<MicrosoftDotNetBuildTasksFeedTaskDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MicrosoftDotNetBuildTasksFeedFilePath)tools/netcoreapp3.1/</MicrosoftDotNetBuildTasksFeedTaskDir>

<PackagesPath Condition=" '$(PackagesPath)' == '' ">$(ArtifactsDir)\$(Configuration)\packages\</PackagesPath>
<PackagesPath Condition=" !$(PackagesPath.EndsWith('\')) ">$(PackagesPath)\</PackagesPath>
<AssetManifestFilePath Condition=" '$(AssetManifestFilePath)' == '' ">$(PackagesPath)manifest\manifest.xml</AssetManifestFilePath>
<PackagesToPublishPattern Condition=" '$(PackagesToPublishPattern)' == '' ">$(PackagesPath)*.nupkg</PackagesToPublishPattern>
<PackagesPathWithTrailingSlash>$(PackagesPath)</PackagesPathWithTrailingSlash>
<PackagesPathWithTrailingSlash Condition=" '$(PackagesPathWithTrailingSlash)' == '' ">$(ArtifactsDir)\$(Configuration)\packages\</PackagesPathWithTrailingSlash>
<PackagesPathWithTrailingSlash Condition=" !$(PackagesPathWithTrailingSlash.EndsWith('\')) ">$(PackagesPathWithTrailingSlash)\</PackagesPathWithTrailingSlash>

<AssetManifestFilePath Condition=" '$(AssetManifestFilePath)' == '' ">$(PackagesPathWithTrailingSlash)manifest\manifest.xml</AssetManifestFilePath>
<PackagesToPublishPattern Condition=" '$(PackagesToPublishPattern)' == '' ">$(PackagesPathWithTrailingSlash)*.nupkg</PackagesToPublishPattern>
<FeedUrl Condition=" '$(FeedUrl)' == '' ">https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json</FeedUrl>
</PropertyGroup>

Expand Down
3 changes: 2 additions & 1 deletion scripts/common.lib.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ function Invoke-Exe {
[int[]] $IgnoreExitCode
)
Write-Verbose "Invoking: $Command $Arguments"
& $Command ($Arguments -split ' ')
([ScriptBlock]::Create("$Command $Arguments")).Invoke()

if ($IgnoreExitCode -notcontains $LASTEXITCODE) {
Set-ScriptFailedOnError -Command $Command -Arguments $Arguments
}
Expand Down

0 comments on commit 48b4d2a

Please sign in to comment.