Skip to content

Commit 86b3706

Browse files
authored
Merge pull request #2975 from PrismLibrary/dev/ds/release-fixes
2 parents 4c8fc9c + 8fd948a commit 86b3706

File tree

4 files changed

+4
-45
lines changed

4 files changed

+4
-45
lines changed

.github/workflows/start-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
uses: actions/upload-artifact@v3
127127
with:
128128
name: NuGet
129-
path: .\artifacts
129+
path: .\artifacts\nuget
130130

131131
release:
132132
uses: avantipoint/workflow-templates/.github/workflows/generate-release.yml@master
@@ -135,4 +135,3 @@ jobs:
135135
contents: write
136136
with:
137137
package-name: Prism.Core
138-
artifacts: "Artifacts/NuGet/*.nupkg,Artifacts/NuGet/*.snupkg,Artifacts/*.zip"

Directory.Build.props

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
<RepositoryUrl>https://github.com/PrismLibrary/Prism</RepositoryUrl>
1212
<IncludeSymbols>True</IncludeSymbols>
1313
<IncludeSource>True</IncludeSource>
14-
<ArtifactStagingRoot>$(MSBuildThisFileDirectory)Artifacts</ArtifactStagingRoot>
15-
<ArtifactStagingRoot Condition=" '$(BUILD_ARTIFACTSTAGINGDIRECTORY)' != '' ">$(BUILD_ARTIFACTSTAGINGDIRECTORY)</ArtifactStagingRoot>
16-
<PackageOutputPath>$([System.IO.Path]::Combine('$(ArtifactStagingRoot)', 'NuGet'))</PackageOutputPath>
14+
<PackageOutputPath>$(MSBuildThisFileDirectory)Artifacts</PackageOutputPath>
1715
<EscapedCurrentDirectory>$([System.Text.RegularExpressions.Regex]::Escape('$(MSBuildThisFileDirectory)'))</EscapedCurrentDirectory>
1816
<RelativeProjectPath>$([System.Text.RegularExpressions.Regex]::Replace('$(MSBuildProjectFullPath)', '$(EscapedCurrentDirectory)', ''))</RelativeProjectPath>
1917
<PrismPackageIcon>$(MSBuildThisFileDirectory)images/prism-logo.png</PrismPackageIcon>

Directory.Build.targets

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,6 @@
1111
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
1212
</PropertyGroup>
1313

14-
<Target Name="_ReleaseBinaryCopy"
15-
Condition=" !'$(IsTestProject)' And '$(IsPackable)' "
16-
BeforeTargets="AfterBuild;WpfPack">
17-
18-
<PropertyGroup>
19-
<BinariesFolderName Condition=" '$(IsCoreProject)' ">Core</BinariesFolderName>
20-
<BinariesFolderName Condition=" '$(IsFormsProject)' ">Forms</BinariesFolderName>
21-
<BinariesFolderName Condition=" '$(IsWpfProject)' ">WPF</BinariesFolderName>
22-
<BinariesFolderName Condition=" '$(IsUnoProject)' ">Uno</BinariesFolderName>
23-
<BinariesFolderName Condition=" '$(IsMauiProject)' ">Maui</BinariesFolderName>
24-
<ArtifactStaging>$([System.IO.Path]::Combine('$(ArtifactStagingRoot)', $(Configuration), '$(BinariesFolderName)', '$(TargetFramework)'))</ArtifactStaging>
25-
</PropertyGroup>
26-
27-
<Copy SourceFiles="$(OutputPath)$(AssemblyName).dll"
28-
DestinationFolder="$(ArtifactStaging)"
29-
Condition=" Exists('$(OutputPath)$(AssemblyName).dll') " />
30-
<Copy SourceFiles="$(OutputPath)$(AssemblyName).xml"
31-
DestinationFolder="$(ArtifactStaging)"
32-
Condition=" Exists('$(OutputPath)$(AssemblyName).xml') " />
33-
<Copy SourceFiles="$(OutputPath)$(AssemblyName).pdb"
34-
DestinationFolder="$(ArtifactStaging)"
35-
Condition=" Exists('$(OutputPath)$(AssemblyName).pdb') " />
36-
<Copy SourceFiles="$(OutputPath)$(AssemblyName).pri"
37-
DestinationFolder="$(ArtifactStaging)"
38-
Condition=" Exists('$(OutputPath)$(AssemblyName).pri') " />
39-
40-
</Target>
41-
42-
4314
<Choose>
4415
<When Condition="$(IsUnoProject)">
4516
<ItemGroup>

build/consolidate-artifacts.ps1

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@
22

33
$executionRoot = Get-Location
44
$artifactsRoot = $executionRoot, 'artifacts' -join '\'
5-
$binariesRoot = $executionRoot, 'artifacts', 'binaries' -join '\'
6-
$artifactsZipPath = $executionRoot, 'artifacts', 'Release.zip' -join '\'
75
$nugetRoot = $executionRoot, 'artifacts', 'nuget' -join '\'
8-
Get-ChildItem .\ -Include $binariesRoot -Recurse | ForEach-Object ($_) { Remove-Item $_.Fullname -Force -Recurse }
96
Get-ChildItem .\ -Include $nugetRoot -Recurse | ForEach-Object ($_) { Remove-Item $_.Fullname -Force -Recurse }
10-
New-Item -Path $binariesRoot -ItemType Directory -Force > $null
117
New-Item -Path $nugetRoot -ItemType Directory -Force > $null
128
$platforms = @('Forms', 'Wpf', 'Uno', 'Maui')
139

1410
$core = @("Prism.Core", "Prism.Events", "Prism.dll", "Prism.pdb", "Prism.xml")
1511
$allowedExtensions = @('.dll', '.pdb', '.xml', '.pri', '.nupkg', '.snupkg')
16-
$files = Get-ChildItem -Path $artifactsRoot -Filter "*" -Recurse | Where-Object { (Test-Path -Path $_.FullName -PathType Leaf) -and $_.FullName.StartsWith($binariesRoot) -eq $false -and $_.FullName.StartsWith($nugetRoot) -eq $false -and ($allowedExtensions -contains [System.IO.Path]::GetExtension($_.FullName)) }
12+
$files = Get-ChildItem -Path $artifactsRoot -Filter "*" -Recurse | Where-Object { (Test-Path -Path $_.FullName -PathType Leaf) -and $_.FullName.StartsWith($nugetRoot) -eq $false -and ($allowedExtensions -contains [System.IO.Path]::GetExtension($_.FullName)) }
1713

1814
if ($files.Count -eq 0)
1915
{
@@ -50,8 +46,6 @@ foreach($file in $files)
5046
$parentDirName = Split-Path -Path (Split-Path -Path $file.FullName -Parent) -Leaf
5147

5248
Write-Output "Determining Copy Path for $parentDirName"
53-
$copyPath = Join-Path $binariesRoot -ChildPath $parentDirName
54-
5549
if ((Test-Path -Path $copyPath -PathType Container) -eq $false)
5650
{
5751
Write-Output "Creating $copyPath"
@@ -62,7 +56,4 @@ foreach($file in $files)
6256
}
6357
}
6458

65-
Get-ChildItem $artifactsRoot | Where-Object { $_.Name -ne 'binaries' -and $_.Name -ne 'nuget' } | ForEach-Object { Remove-Item $_.FullName -Force -Recurse }
66-
67-
Compress-Archive -Path $binariesRoot -DestinationPath $artifactsZipPath -Force
68-
Remove-Item -Path $binariesRoot -Recurse -Force
59+
Get-ChildItem $artifactsRoot | Where-Object { $_.Name -ne 'nuget' } | ForEach-Object { Remove-Item $_.FullName -Force -Recurse }

0 commit comments

Comments
 (0)