summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-04-17 00:09:21 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-04-17 00:09:21 +0700
commitbd4a3f4a30c0c8fe88c2fb100336ea24ff3829b8 (patch)
treebbb7d15d252444ef461c28d1cdcbeb0264a1c0bb /crypto
parentFIx binary compatibility issues (diff)
downloadBouncyCastle.NET-ed25519-bd4a3f4a30c0c8fe88c2fb100336ea24ff3829b8.tar.xz
Basic setup for signing assemblies post-build
Diffstat (limited to 'crypto')
-rw-r--r--crypto/src/BouncyCastle.Crypto.csproj11
-rw-r--r--crypto/test/BouncyCastle.Crypto.Tests.csproj5
2 files changed, 16 insertions, 0 deletions
diff --git a/crypto/src/BouncyCastle.Crypto.csproj b/crypto/src/BouncyCastle.Crypto.csproj
index a22f71335..b7fc0cf30 100644
--- a/crypto/src/BouncyCastle.Crypto.csproj
+++ b/crypto/src/BouncyCastle.Crypto.csproj
@@ -24,6 +24,7 @@
 	<Product>BouncyCastle.NET</Product>
 	<PublishRepositoryUrl>true</PublishRepositoryUrl>
     <Title>BouncyCastle.NET Cryptography</Title>
+    <Configurations>Debug;Release;Publish</Configurations>
   </PropertyGroup>
 
   <!-- CI systems other than GitLab might need different conditions -->
@@ -72,6 +73,13 @@
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)'=='Publish'">
+    <DefineConstants />
+    <GenerateDocumentationFile>true</GenerateDocumentationFile>
+    <!-- Deterministic build. -->
+    <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
+  </PropertyGroup>
+
   <ItemGroup>
     <None Remove="**\*.properties" />
     <None Remove="pqc\crypto\**\*.bz2" />
@@ -102,4 +110,7 @@
 		<!-- Here we can override/use any MSBuild properties set by Nerdbank.GitVersioning -->
     </PropertyGroup>
   </Target>
+  <Target Name="SignAssemblies" AfterTargets="PostBuildEvent" Condition="'$(Configuration)'=='Publish'">
+    <Exec Command="call &quot;$(ProjectDir)..\..\signfile.bat&quot; &quot;$(TargetPath)&quot;" />
+  </Target>
 </Project>
diff --git a/crypto/test/BouncyCastle.Crypto.Tests.csproj b/crypto/test/BouncyCastle.Crypto.Tests.csproj
index 45a03b0e7..94d2eff7b 100644
--- a/crypto/test/BouncyCastle.Crypto.Tests.csproj
+++ b/crypto/test/BouncyCastle.Crypto.Tests.csproj
@@ -8,6 +8,7 @@
     <NoWarn>618;1591</NoWarn>
     <RootNamespace>Org.BouncyCastle</RootNamespace>
     <RunAnalyzersDuringBuild>False</RunAnalyzersDuringBuild>
+    <Configurations>Debug;Release;Publish</Configurations>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)'=='Debug'">
@@ -18,6 +19,10 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(Configuration)'=='Publish'">
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+  </PropertyGroup>
+
   <ItemGroup>
     <Compile Include="src\**\*.cs" Exclude="**\examples\**\*.cs" />
     <EmbeddedResource Include="data\**\*.*" Exclude="**\README.txt" />