From f0ae02ca6fa8cc9d7eefbd1f9d1f51cd420ad82b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E5=BD=A6=E8=B5=A4=E5=B1=8B=E5=85=88?= Date: Sun, 2 Apr 2023 20:16:52 +0900 Subject: [PATCH] Use the autogenerated build number provided by Azure --- Amethyst/Amethyst.csproj | 2 +- Amethyst/Classes/AppData.cs | 2 +- K2CrashHandler/K2CrashHandler.csproj | 2 +- azure-pipelines.yml | 6 ++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Amethyst/Amethyst.csproj b/Amethyst/Amethyst.csproj index 082ff3eb..5eafe974 100644 --- a/Amethyst/Amethyst.csproj +++ b/Amethyst/Amethyst.csproj @@ -27,7 +27,7 @@ © K2VR Team Amethyst (Desktop) App k2vr.tech - 1.2.230402.2 + AZ_BUILD_NUMBER 1.2.1.3 1.2.1.3 https://github.com/KinectToVR/Amethyst diff --git a/Amethyst/Classes/AppData.cs b/Amethyst/Classes/AppData.cs index 84b25322..dfc456c4 100644 --- a/Amethyst/Classes/AppData.cs +++ b/Amethyst/Classes/AppData.cs @@ -8,7 +8,7 @@ public static class AppData // Internal version number public static (string Display, string Internal) - VersionString { get; } = ("1.2.1.3", "1.2.230402.2"); + VersionString { get; } = ("1.2.1.3", "AZ_BUILD_NUMBER"); // Application settings public static AppSettings Settings { get; set; } = new(); diff --git a/K2CrashHandler/K2CrashHandler.csproj b/K2CrashHandler/K2CrashHandler.csproj index eb3c3df8..edafcd33 100644 --- a/K2CrashHandler/K2CrashHandler.csproj +++ b/K2CrashHandler/K2CrashHandler.csproj @@ -23,7 +23,7 @@ © K2VR Team Amethyst Crash and Recovery Handler k2vr.tech - 1.2.230402.2 + AZ_BUILD_NUMBER 1.2.1.3 1.2.1.3 https://github.com/KinectToVR/Amethyst diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e7b95ea4..df922e8a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -39,6 +39,12 @@ steps: inputs: restoreSolution: '$(solution)' +- pwsh: | + ((Get-Content -path .\Amethyst\Amethyst.csproj -Raw) -replace 'AZ_BUILD_NUMBER', "$(Build.BuildNumber)") | Set-Content -Path .\Amethyst\Amethyst.csproj + ((Get-Content -path .\K2CrashHandler\K2CrashHandler.csproj -Raw) -replace 'AZ_BUILD_NUMBER', "$(Build.BuildNumber)") | Set-Content -Path .\K2CrashHandler\K2CrashHandler.csproj + ((Get-Content -path .\Amethyst\Classes\AppData.cs -Raw) -replace 'AZ_BUILD_NUMBER', "$(Build.BuildNumber)") | Set-Content -Path .\Amethyst\Classes\AppData.cs + displayName: Add version data to Amethyst + - pwsh: | ((Get-Content -path .\Amethyst\Classes\AppData.cs -Raw) -replace 'AZ_API_TOKEN', "$(AppToken)") | Set-Content -Path .\Amethyst\Classes\AppData.cs ((Get-Content -path .\Amethyst\App.xaml.cs -Raw) -replace 'AZ_COMMIT_SHA', "$(Build.SourceVersion)") | Set-Content -Path .\Amethyst\App.xaml.cs