Skip to content

Commit

Permalink
Use the autogenerated build number provided by Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
KimihikoAkayasaki committed Apr 2, 2023
1 parent d21b979 commit f0ae02c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Amethyst/Amethyst.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<Copyright>© K2VR Team</Copyright>
<Description>Amethyst (Desktop) App</Description>
<PackageProjectUrl>k2vr.tech</PackageProjectUrl>
<Version>1.2.230402.2</Version>
<Version>AZ_BUILD_NUMBER</Version>
<FileVersion>1.2.1.3</FileVersion>
<AssemblyVersion>1.2.1.3</AssemblyVersion>
<RepositoryUrl>https://github.com/KinectToVR/Amethyst</RepositoryUrl>
Expand Down
2 changes: 1 addition & 1 deletion Amethyst/Classes/AppData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion K2CrashHandler/K2CrashHandler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Copyright>© K2VR Team</Copyright>
<Description>Amethyst Crash and Recovery Handler</Description>
<PackageProjectUrl>k2vr.tech</PackageProjectUrl>
<Version>1.2.230402.2</Version>
<Version>AZ_BUILD_NUMBER</Version>
<FileVersion>1.2.1.3</FileVersion>
<AssemblyVersion>1.2.1.3</AssemblyVersion>
<RepositoryUrl>https://github.com/KinectToVR/Amethyst</RepositoryUrl>
Expand Down
6 changes: 6 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f0ae02c

Please sign in to comment.