Skip to content

Commit 1929b48

Browse files
committed
Use shared AssemblyInfo.cs to fix version number in log
Signed-off-by: Victor Chang <[email protected]>
1 parent 5025d3c commit 1929b48

19 files changed

+99
-3
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,18 @@ jobs:
5757
uses: gittools/actions/gitversion/[email protected]
5858
with:
5959
useConfigFile: true
60+
updateAssemblyInfo: true
61+
updateAssemblyInfoFilename: src/AssemblyInfo.cs
6062
configFilePath: .github/.gitversion.yml
6163

64+
- name: Upload AssemblyInfo
65+
uses: actions/[email protected]
66+
if: always()
67+
with:
68+
name: aseembly-info
69+
path: src/AssemblyInfo.cs
70+
retention-days: 30
71+
6272
CodeQL-Analyze:
6373
runs-on: ubuntu-latest
6474
permissions:
@@ -330,6 +340,11 @@ jobs:
330340
restore-keys: |
331341
${{ runner.os }}-nuget
332342
343+
- name: Download AssemblyInfo.cs
344+
uses: actions/download-artifact@v3
345+
with:
346+
name: assembly-info
347+
333348
- name: Restore dependencies
334349
run: dotnet restore
335350
working-directory: ./src

src/Api/Monai.Deploy.InformaticsGateway.Api.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<AdditionalFiles Include="..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
4747
</ItemGroup>
4848

49+
<ItemGroup>
50+
<Compile Include="..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
51+
</ItemGroup>
52+
4953
<ItemGroup>
5054
<ProjectReference Include="..\Common\Monai.Deploy.InformaticsGateway.Common.csproj" />
5155
</ItemGroup>

src/AssemblyInfo.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2022 MONAI Consortium
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
//------------------------------------------------------------------------------
18+
// <auto-generated>
19+
// This code was generated by GitVersion.
20+
//
21+
// You can modify this code as we will not overwrite it when re-executing GitVersion
22+
// </auto-generated>
23+
//------------------------------------------------------------------------------
24+
25+
using System.Reflection;
26+
27+
[assembly: AssemblyFileVersion("0.0.0.0")]
28+
[assembly: AssemblyVersion("0.0.0.0")]
29+
[assembly: AssemblyInformationalVersion("0.0.0")]
File renamed without changes.

src/CLI/Monai.Deploy.InformaticsGateway.CLI.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!--
1+
<!--
22
~ Copyright 2021-2022 MONAI Consortium
33
~
44
~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -38,6 +38,10 @@
3838
<AdditionalFiles Include="..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
3939
</ItemGroup>
4040

41+
<ItemGroup>
42+
<Compile Include="..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
43+
</ItemGroup>
44+
4145
<ItemGroup>
4246
<ProjectReference Include="..\Api\Monai.Deploy.InformaticsGateway.Api.csproj" />
4347
<ProjectReference Include="..\Client\Monai.Deploy.InformaticsGateway.Client.csproj" />

src/Client.Common/Monai.Deploy.InformaticsGateway.Client.Common.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,8 @@
4444
<AdditionalFiles Include="..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
4545
</ItemGroup>
4646

47+
<ItemGroup>
48+
<Compile Include="..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
49+
</ItemGroup>
50+
4751
</Project>
File renamed without changes.

src/Client/Monai.Deploy.InformaticsGateway.Client.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
<AdditionalFiles Include="..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
4343
</ItemGroup>
4444

45+
<ItemGroup>
46+
<Compile Include="..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
47+
</ItemGroup>
48+
4549
<ItemGroup>
4650
<ProjectReference Include="..\Api\Monai.Deploy.InformaticsGateway.Api.csproj" />
4751
<ProjectReference Include="..\Client.Common\Monai.Deploy.InformaticsGateway.Client.Common.csproj" />

src/Common/Monai.Deploy.InformaticsGateway.Common.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!--
1+
<!--
22
~ Copyright 2021-2022 MONAI Consortium
33
~
44
~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -47,4 +47,8 @@
4747
<AdditionalFiles Include="..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
4848
</ItemGroup>
4949

50+
<ItemGroup>
51+
<Compile Include="..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
52+
</ItemGroup>
53+
5054
</Project>

src/Configuration/Monai.Deploy.InformaticsGateway.Configuration.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<AdditionalFiles Include="..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
4747
</ItemGroup>
4848

49+
<ItemGroup>
50+
<Compile Include="..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
51+
</ItemGroup>
52+
4953
<ItemGroup>
5054
<ProjectReference Include="..\Api\Monai.Deploy.InformaticsGateway.Api.csproj" />
5155
<ProjectReference Include="..\Common\Monai.Deploy.InformaticsGateway.Common.csproj" />

src/Database/Api/Monai.Deploy.InformaticsGateway.Database.Api.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
<None Remove="Test\**" />
3131
</ItemGroup>
3232

33+
<ItemGroup>
34+
<Compile Include="..\..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
35+
</ItemGroup>
36+
3337
<ItemGroup>
3438
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.15" />
3539
<PackageReference Include="Polly" Version="7.2.3" />

src/Database/EntityFramework/Monai.Deploy.InformaticsGateway.Database.EntityFramework.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!--
1+
<!--
22
~ Copyright 2021-2022 MONAI Consortium
33
~
44
~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -36,6 +36,10 @@
3636
<AdditionalFiles Include="..\..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
3737
</ItemGroup>
3838

39+
<ItemGroup>
40+
<Compile Include="..\..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
41+
</ItemGroup>
42+
3943
<ItemGroup>
4044
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.15" />
4145
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.15">

src/Database/Monai.Deploy.InformaticsGateway.Database.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
<AdditionalFiles Include="..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
6262
</ItemGroup>
6363

64+
<ItemGroup>
65+
<Compile Include="..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
66+
</ItemGroup>
67+
6468
<ItemGroup>
6569
<PackageReference Include="AspNetCore.HealthChecks.MongoDb" Version="6.0.2" />
6670
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">

src/Database/MongoDB/Monai.Deploy.InformaticsGateway.Database.MongoDB.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
<AdditionalFiles Include="..\..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
3737
</ItemGroup>
3838

39+
<ItemGroup>
40+
<Compile Include="..\..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
41+
</ItemGroup>
42+
3943
<ItemGroup>
4044
<PackageReference Include="MongoDB.Driver" Version="2.19.0" />
4145
<PackageReference Include="MongoDB.Driver.Core" Version="2.19.0" />

src/DicomWebClient/CLI/Monai.Deploy.InformaticsGateway.DicomWeb.Client.CLI.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
<AdditionalFiles Include="..\..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
2525
</ItemGroup>
2626

27+
<ItemGroup>
28+
<Compile Include="..\..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
29+
</ItemGroup>
30+
2731
<ItemGroup>
2832
<ProjectReference Include="..\..\Client.Common\Monai.Deploy.InformaticsGateway.Client.Common.csproj" />
2933
<ProjectReference Include="..\Monai.Deploy.InformaticsGateway.DicomWeb.Client.csproj" />

src/DicomWebClient/Monai.Deploy.InformaticsGateway.DicomWeb.Client.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
<AdditionalFiles Include="..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
4343
</ItemGroup>
4444

45+
<ItemGroup>
46+
<Compile Include="..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
47+
</ItemGroup>
48+
4549
<ItemGroup>
4650
<PackageReference Include="Ardalis.GuardClauses" Version="4.0.1" />
4751
<PackageReference Include="fo-dicom" Version="5.0.3" />

src/InformaticsGateway/Monai.Deploy.InformaticsGateway.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@
7777
<AdditionalFiles Include="..\.sonarlint\project-monai_monai-deploy-informatics-gateway\CSharp\SonarLint.xml" Link="SonarLint.xml" />
7878
</ItemGroup>
7979

80+
<ItemGroup>
81+
<Compile Include="..\AssemblyInfo.cs" Link="AssemblyInfo.cs" />
82+
</ItemGroup>
83+
8084
<ItemGroup>
8185
<ProjectReference Include="..\Api\Monai.Deploy.InformaticsGateway.Api.csproj" />
8286
<ProjectReference Include="..\Common\Monai.Deploy.InformaticsGateway.Common.csproj" />

0 commit comments

Comments
 (0)