From 1488d6a9387cc363beb6ca835a3695c65638bffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Thu, 21 Dec 2023 13:26:09 +0100 Subject: [PATCH] feat: Add version in csharp packages --- .../ArmoniK.Api.Client.Tests.csproj | 1 + .../ArmoniK.Api.Client/ArmoniK.Api.Client.csproj | 1 + .../ArmoniK.Api.Common.Channel.csproj | 1 + .../ArmoniK.Api.Common/ArmoniK.Api.Common.csproj | 1 + .../csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj | 1 + .../csharp/ArmoniK.Api.Mock/ArmoniK.Api.Mock.csproj | 1 + .../ArmoniK.Api.Tests/ArmoniK.Api.Worker.Tests.csproj | 1 + .../ArmoniK.Api.Worker/ArmoniK.Api.Worker.csproj | 1 + scripts/update-versions.ts | 11 ++++++++--- scripts/verify-versions.ts | 9 ++++++--- scripts/versions/_contants.ts | 3 ++- 11 files changed, 24 insertions(+), 7 deletions(-) diff --git a/packages/csharp/ArmoniK.Api.Client.Test/ArmoniK.Api.Client.Tests.csproj b/packages/csharp/ArmoniK.Api.Client.Test/ArmoniK.Api.Client.Tests.csproj index 1313fec98..05e64ab18 100644 --- a/packages/csharp/ArmoniK.Api.Client.Test/ArmoniK.Api.Client.Tests.csproj +++ b/packages/csharp/ArmoniK.Api.Client.Test/ArmoniK.Api.Client.Tests.csproj @@ -10,6 +10,7 @@ Embedded true 3.14.0 + 3.14.0 enable diff --git a/packages/csharp/ArmoniK.Api.Client/ArmoniK.Api.Client.csproj b/packages/csharp/ArmoniK.Api.Client/ArmoniK.Api.Client.csproj index 1237ce0d3..3bfc33e3c 100644 --- a/packages/csharp/ArmoniK.Api.Client/ArmoniK.Api.Client.csproj +++ b/packages/csharp/ArmoniK.Api.Client/ArmoniK.Api.Client.csproj @@ -15,6 +15,7 @@ ../kp.snk true 3.14.0 + 3.14.0 True diff --git a/packages/csharp/ArmoniK.Api.Common.Channel/ArmoniK.Api.Common.Channel.csproj b/packages/csharp/ArmoniK.Api.Common.Channel/ArmoniK.Api.Common.Channel.csproj index f9e439526..7df08661f 100644 --- a/packages/csharp/ArmoniK.Api.Common.Channel/ArmoniK.Api.Common.Channel.csproj +++ b/packages/csharp/ArmoniK.Api.Common.Channel/ArmoniK.Api.Common.Channel.csproj @@ -5,6 +5,7 @@ enable enable 3.14.0 + 3.14.0 ../publish True True diff --git a/packages/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj b/packages/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj index 3cc6b4698..f32e46f6a 100755 --- a/packages/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj +++ b/packages/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj @@ -15,6 +15,7 @@ ../kp.snk true 3.14.0 + 3.14.0 True diff --git a/packages/csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj b/packages/csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj index f89005982..f038dfed1 100644 --- a/packages/csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj +++ b/packages/csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj @@ -17,6 +17,7 @@ snupkg ../kp.snk 3.14.0 + 3.14.0 True True diff --git a/packages/csharp/ArmoniK.Api.Mock/ArmoniK.Api.Mock.csproj b/packages/csharp/ArmoniK.Api.Mock/ArmoniK.Api.Mock.csproj index a59566cac..7a418fc4e 100644 --- a/packages/csharp/ArmoniK.Api.Mock/ArmoniK.Api.Mock.csproj +++ b/packages/csharp/ArmoniK.Api.Mock/ArmoniK.Api.Mock.csproj @@ -15,6 +15,7 @@ snupkg ../kp.snk 3.14.0 + 3.14.0 True diff --git a/packages/csharp/ArmoniK.Api.Tests/ArmoniK.Api.Worker.Tests.csproj b/packages/csharp/ArmoniK.Api.Tests/ArmoniK.Api.Worker.Tests.csproj index 6689ea880..0de0cb6fc 100644 --- a/packages/csharp/ArmoniK.Api.Tests/ArmoniK.Api.Worker.Tests.csproj +++ b/packages/csharp/ArmoniK.Api.Tests/ArmoniK.Api.Worker.Tests.csproj @@ -10,6 +10,7 @@ Embedded true 3.14.0 + 3.14.0 diff --git a/packages/csharp/ArmoniK.Api.Worker/ArmoniK.Api.Worker.csproj b/packages/csharp/ArmoniK.Api.Worker/ArmoniK.Api.Worker.csproj index b3938a25e..e61dcfd44 100644 --- a/packages/csharp/ArmoniK.Api.Worker/ArmoniK.Api.Worker.csproj +++ b/packages/csharp/ArmoniK.Api.Worker/ArmoniK.Api.Worker.csproj @@ -17,6 +17,7 @@ snupkg ../kp.snk 3.14.0 + 3.14.0 True True diff --git a/scripts/update-versions.ts b/scripts/update-versions.ts index ffb1d1a42..05a55f902 100644 --- a/scripts/update-versions.ts +++ b/scripts/update-versions.ts @@ -5,7 +5,8 @@ import { cppFiles, cppPattern, csharpFiles, - csharpPattern, + csharpPatternPackageVersion, + csharpPatternVersion, jsFiles, jsPattern, } from './versions/_contants' @@ -21,9 +22,13 @@ if (args.length === 0) { const version = args[0] -consola.info('Updating C# projects to ', version) +consola.info('Updating C# projects to ', version) csharpFiles.forEach( - _readAndReplace(csharpPattern, `${version}`), + _readAndReplace(csharpPatternPackageVersion, `${version}`), +) +consola.info('Updating C# projects to ', version) +csharpFiles.forEach( + _readAndReplace(csharpPatternVersion, `${version}`), ) consola.info('Updating JS projects to ', version) diff --git a/scripts/verify-versions.ts b/scripts/verify-versions.ts index 9d0a11de9..ae7b4ef02 100644 --- a/scripts/verify-versions.ts +++ b/scripts/verify-versions.ts @@ -4,7 +4,8 @@ import { cppFiles, cppPattern, csharpFiles, - csharpPattern, + csharpPatternPackageVersion, + csharpPatternVersion, jsFiles, jsPattern, } from './versions/_contants' @@ -15,8 +16,10 @@ const [, , ...args] = process.argv consola.info('Finding JS projects versions') jsFiles.forEach(_readAndFind(jsPattern, versions)) -consola.info('Finding C# projects versions') -csharpFiles.forEach(_readAndFind(csharpPattern, versions)) +consola.info('Finding C# projects versions') +csharpFiles.forEach(_readAndFind(csharpPatternPackageVersion, versions)) +consola.info('Finding C# projects versions') +csharpFiles.forEach(_readAndFind(csharpPatternVersion, versions)) consola.info('Finding Cpp projects versions') cppFiles.forEach(_readAndFind(cppPattern, versions)) diff --git a/scripts/versions/_contants.ts b/scripts/versions/_contants.ts index d7e5ec4c5..268e4bb8d 100644 --- a/scripts/versions/_contants.ts +++ b/scripts/versions/_contants.ts @@ -1,6 +1,7 @@ import { glob } from 'glob' -export const csharpPattern = /(?.*)<\/PackageVersion>/ +export const csharpPatternPackageVersion = /(?.*)<\/PackageVersion>/ +export const csharpPatternVersion = /(?.*)<\/Version>/ export const csharpFiles = glob.globSync('**/*.csproj') export const pythonPattern = /version = "(?.*)"/g