From da8d2efba3497694d57e706b1a0b9823f93130be Mon Sep 17 00:00:00 2001 From: Blair L Murri Date: Tue, 13 Aug 2024 13:41:11 -0700 Subject: [PATCH] Fix build version metadata generation --- CromwellOnAzure.sln | 3 ++- src/Common/Common.csproj | 1 + src/CommonAssemblyInfo.cs | 16 ---------------- src/CommonAssemblyInfo.props | 9 +++++++++ src/CromwellApiClient/CromwellApiClient.csproj | 1 + src/Directory.Build.props | 3 +++ src/TriggerService/TriggerService.cs | 2 ++ src/TriggerService/TriggerService.csproj | 1 + .../deploy-cromwell-on-azure.csproj | 1 + src/ga4gh-tes | 2 +- 10 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 src/CommonAssemblyInfo.cs create mode 100644 src/CommonAssemblyInfo.props create mode 100644 src/Directory.Build.props diff --git a/CromwellOnAzure.sln b/CromwellOnAzure.sln index fdfeae33a..d320ab0cd 100644 --- a/CromwellOnAzure.sln +++ b/CromwellOnAzure.sln @@ -7,7 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig after.CromwellOnAzure.sln.targets = after.CromwellOnAzure.sln.targets CodeCoverage.runsettings = CodeCoverage.runsettings - src\CommonAssemblyInfo.cs = src\CommonAssemblyInfo.cs + src\CommonAssemblyInfo.props = src\CommonAssemblyInfo.props + src\Directory.Build.props = src\Directory.Build.props src\Dockerfile-TriggerService = src\Dockerfile-TriggerService EndProjectSection EndProject diff --git a/src/Common/Common.csproj b/src/Common/Common.csproj index 3ad4f9958..fc735d220 100644 --- a/src/Common/Common.csproj +++ b/src/Common/Common.csproj @@ -2,6 +2,7 @@ net8.0 + $(Product) common library diff --git a/src/CommonAssemblyInfo.cs b/src/CommonAssemblyInfo.cs deleted file mode 100644 index 8148137da..000000000 --- a/src/CommonAssemblyInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Reflection; - -[assembly: AssemblyCompany("Microsoft Corporation")] -[assembly: AssemblyProduct("Cromwell on Azure")] -[assembly: AssemblyCopyright("Copyright © Microsoft Corporation")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -#if DEBUG -[assembly: AssemblyConfiguration("Debug")] -#else -[assembly: AssemblyConfiguration("Release")] -#endif - -[assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.0.0.0")] diff --git a/src/CommonAssemblyInfo.props b/src/CommonAssemblyInfo.props new file mode 100644 index 000000000..860492ff5 --- /dev/null +++ b/src/CommonAssemblyInfo.props @@ -0,0 +1,9 @@ + + + 0.0.0.0 + Microsoft Corporation + Cromwell on Azure + Copyright © Microsoft Corporation + $([System.Version]::Parse($(AssemblyVersion)).Major).$([System.Version]::Parse($(AssemblyVersion)).Minor).$([System.Version]::Parse($(AssemblyVersion)).Build) + + diff --git a/src/CromwellApiClient/CromwellApiClient.csproj b/src/CromwellApiClient/CromwellApiClient.csproj index 4630a69e1..1aa9b534d 100644 --- a/src/CromwellApiClient/CromwellApiClient.csproj +++ b/src/CromwellApiClient/CromwellApiClient.csproj @@ -2,6 +2,7 @@ net8.0 + $(Product) Cromwell API client diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 000000000..51bfe5f8e --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/src/TriggerService/TriggerService.cs b/src/TriggerService/TriggerService.cs index ab7b45260..60012adb3 100644 --- a/src/TriggerService/TriggerService.cs +++ b/src/TriggerService/TriggerService.cs @@ -3,6 +3,7 @@ using System; using System.Linq; +using System.Reflection; using System.Threading.Tasks; using Azure.Identity; using Azure.ResourceManager; @@ -28,6 +29,7 @@ public TriggerService() public static async Task Main() { + Console.WriteLine($"TriggerService Build: {Assembly.GetExecutingAssembly().GetCustomAttribute().InformationalVersion}"); AzureCloudConfig azureCloudConfig = null; await Host.CreateDefaultBuilder() diff --git a/src/TriggerService/TriggerService.csproj b/src/TriggerService/TriggerService.csproj index 6e6466964..e2b001f59 100644 --- a/src/TriggerService/TriggerService.csproj +++ b/src/TriggerService/TriggerService.csproj @@ -3,6 +3,7 @@ Exe net8.0 + $(Product) Trigger Service diff --git a/src/deploy-cromwell-on-azure/deploy-cromwell-on-azure.csproj b/src/deploy-cromwell-on-azure/deploy-cromwell-on-azure.csproj index 34f645255..a87ff588d 100644 --- a/src/deploy-cromwell-on-azure/deploy-cromwell-on-azure.csproj +++ b/src/deploy-cromwell-on-azure/deploy-cromwell-on-azure.csproj @@ -8,6 +8,7 @@ true true true + $(Product) deployment utility diff --git a/src/ga4gh-tes b/src/ga4gh-tes index aa8654534..74d98af96 160000 --- a/src/ga4gh-tes +++ b/src/ga4gh-tes @@ -1 +1 @@ -Subproject commit aa8654534c7892a0c02346a399ca01c6d0833051 +Subproject commit 74d98af9602b9a3608999d9947b17ea26f605297