-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.targets
20 lines (19 loc) · 1.08 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<Project>
<Target Name="SignMacOS"
Condition="'$(IsPublishable)' == 'true' and $([MSBuild]::IsOSPlatform(`Linux`)) and Exists('/usr/local/bin/quill') and ($(RuntimeIdentifier.StartsWith('osx')) or $(AppHostRuntimeIdentifier.StartsWith('osx')))"
AfterTargets="Publish">
<Message Importance="high" Text="Signing: $(PublishedSingleFileName)" />
<Exec Command="quill sign "$(PublishedSingleFilePath)"" />
</Target>
<Target Name="Archive"
Condition="'$(IsPublishable)' == 'true' and '$(CI)' == 'true'"
AfterTargets="Publish">
<PropertyGroup>
<ArchiveDir>$([System.IO.Path]::Combine($(SolutionDir), "dist"))</ArchiveDir>
<ArchiveName>$(ProjectName.Substring($([MSBuild]::Add($(ProjectName.IndexOf('.')), 1))))-$(RuntimeIdentifier)</ArchiveName>
<ArchivePath>$([System.IO.Path]::Combine($(ArchiveDir), "$(ArchiveName).zip"))</ArchivePath>
</PropertyGroup>
<MakeDir Directories="$(ArchiveDir)" />
<ZipDirectory DestinationFile="$(ArchivePath)" SourceDirectory="$(ProjectDir)$(PublishDir)" />
</Target>
</Project>