Skip to content

Commit 8cf15f7

Browse files
committed
build/Release.targets: Added target for appending signature to KEYS file based on Apache ID
1 parent ab7bc89 commit 8cf15f7

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

build/Release.targets

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@
139139
<Error Condition =" '%(_RequiredProperties.Value)'=='' "
140140
Text=" Missing required property [%(_RequiredProperties.Identity)]" />
141141

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

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

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

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

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

197+
<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' ">
198+
<ItemGroup>
199+
<_RequiredProperties Include="ApacheID">
200+
<Value>$(ApacheID)</Value>
201+
</_RequiredProperties>
202+
</ItemGroup>
203+
204+
<Error Condition =" '%(_RequiredProperties.Value)'=='' "
205+
Text=" Missing required property [%(_RequiredProperties.Identity)]" />
206+
207+
<Error Condition ="!Exists('$(SvnReleaseKeysFile)')"
208+
Text=" Keys file '$(SvnReleaseKeysFile)' doesn't exist in lucenenet/release" />
209+
210+
<!-- Add signature to release/lucenenet/KEYS file -->
211+
<Exec WorkingDirectory="$(SvnReleaseDirectory)" Command="(gpg --list-sigs $(ApacheID) &amp;&amp; gpg --armor --export $(ApacheID)) >> KEYS" />
212+
<Exec WorkingDirectory="$(SvnReleaseDirectory)" Command="svn commit -m &quot;Added Key for $(ApacheID)&quot;" />
213+
214+
</Target>
215+
197216
</Project>

0 commit comments

Comments
 (0)