Skip to content

Commit

Permalink
build/Release.targets: Added target for appending signature to KEYS f…
Browse files Browse the repository at this point in the history
…ile based on Apache ID
  • Loading branch information
NightOwl888 committed Apr 25, 2020
1 parent ab7bc89 commit 8cf15f7
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions build/Release.targets
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
<Error Condition =" '%(_RequiredProperties.Value)'=='' "
Text=" Missing required property [%(_RequiredProperties.Identity)]" />

<Error Condition ="!Exists('$(SvnReleaseDirectory)\KEYS')"
Text=" Keys file '$(SvnReleaseDirectory)\KEYS' doesn't exist in lucenenet/release" />
<Error Condition ="!Exists('$(SvnReleaseKeysFile)')"
Text=" Keys file '$(SvnReleaseKeysFile)' doesn't exist in lucenenet/release" />

<!-- Copy KEYS file from release to dev -->
<Message Importance="high" Text="Source: $(SvnReleaseKeysFile), Destination: $(SvnDevDirectory)"/>
Expand All @@ -166,8 +166,8 @@

<Error Condition ="!Exists('$(SvnDevDirectory)\$(PackageVersion)')"
Text=" Directory '$(SvnDevDirectory)\$(PackageVersion)' doesn't exist in lucenenet/dev" />
<Error Condition ="!Exists('$(SvnDevDirectory)\KEYS')"
Text=" Keys file '$(SvnDevDirectory)\KEYS' doesn't exist in lucenenet/dev" />
<Error Condition ="!Exists('$(SvnDevKeysFile)')"
Text=" Keys file '$(SvnDevKeysFile)' doesn't exist in lucenenet/dev" />

<Message Importance="high" Text="Releasing $(PackageVersion)..."/>

Expand All @@ -194,4 +194,23 @@
<Message Importance="high" Text="Release of $(PackageVersion) Complete"/>
</Target>

<Target Name="AppendSignature" Label="Uses GnuPG to append a user's signature to the KEYS file in release/lucenenet" DependsOnTargets="CheckoutRelease" Condition="'$(AssemblyName)' == 'Lucene.Net' ">
<ItemGroup>
<_RequiredProperties Include="ApacheID">
<Value>$(ApacheID)</Value>
</_RequiredProperties>
</ItemGroup>

<Error Condition =" '%(_RequiredProperties.Value)'=='' "
Text=" Missing required property [%(_RequiredProperties.Identity)]" />

<Error Condition ="!Exists('$(SvnReleaseKeysFile)')"
Text=" Keys file '$(SvnReleaseKeysFile)' doesn't exist in lucenenet/release" />

<!-- Add signature to release/lucenenet/KEYS file -->
<Exec WorkingDirectory="$(SvnReleaseDirectory)" Command="(gpg --list-sigs $(ApacheID) &amp;&amp; gpg --armor --export $(ApacheID)) >> KEYS" />
<Exec WorkingDirectory="$(SvnReleaseDirectory)" Command="svn commit -m &quot;Added Key for $(ApacheID)&quot;" />

</Target>

</Project>

0 comments on commit 8cf15f7

Please sign in to comment.