Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.

Commit ccb9240

Browse files
committed
AppVersioning service
1 parent 58d304c commit ccb9240

File tree

20 files changed

+273
-34
lines changed

20 files changed

+273
-34
lines changed

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<LangVersion>10.0</LangVersion>
44
<Nullable>enable</Nullable>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<Configurations>Debug;Insider;Release</Configurations>
67
</PropertyGroup>
78
</Project>

Quarrel.sln

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ Global
3030
Debug|ARM64 = Debug|ARM64
3131
Debug|x64 = Debug|x64
3232
Debug|x86 = Debug|x86
33+
Insider|Any CPU = Insider|Any CPU
34+
Insider|ARM = Insider|ARM
35+
Insider|ARM64 = Insider|ARM64
36+
Insider|x64 = Insider|x64
37+
Insider|x86 = Insider|x86
3338
Release|Any CPU = Release|Any CPU
3439
Release|ARM = Release|ARM
3540
Release|ARM64 = Release|ARM64
@@ -52,6 +57,21 @@ Global
5257
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Debug|x86.ActiveCfg = Debug|x86
5358
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Debug|x86.Build.0 = Debug|x86
5459
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Debug|x86.Deploy.0 = Debug|x86
60+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|Any CPU.ActiveCfg = Release|x86
61+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|Any CPU.Build.0 = Release|x86
62+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|Any CPU.Deploy.0 = Release|x86
63+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|ARM.ActiveCfg = Release|ARM
64+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|ARM.Build.0 = Release|ARM
65+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|ARM.Deploy.0 = Release|ARM
66+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|ARM64.ActiveCfg = Release|ARM64
67+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|ARM64.Build.0 = Release|ARM64
68+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|ARM64.Deploy.0 = Release|ARM64
69+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|x64.ActiveCfg = Insider|x64
70+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|x64.Build.0 = Insider|x64
71+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|x64.Deploy.0 = Insider|x64
72+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|x86.ActiveCfg = Release|x86
73+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|x86.Build.0 = Release|x86
74+
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Insider|x86.Deploy.0 = Release|x86
5575
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Release|Any CPU.ActiveCfg = Release|x64
5676
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Release|Any CPU.Build.0 = Release|x64
5777
{0247C94D-5FD1-45D6-9312-7440317F6C40}.Release|Any CPU.Deploy.0 = Release|x64
@@ -77,6 +97,16 @@ Global
7797
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Debug|x64.Build.0 = Debug|Any CPU
7898
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Debug|x86.ActiveCfg = Debug|Any CPU
7999
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Debug|x86.Build.0 = Debug|Any CPU
100+
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Insider|Any CPU.ActiveCfg = Release|Any CPU
101+
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Insider|Any CPU.Build.0 = Release|Any CPU
102+
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Insider|ARM.ActiveCfg = Release|Any CPU
103+
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Insider|ARM.Build.0 = Release|Any CPU
104+
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Insider|ARM64.ActiveCfg = Release|Any CPU
105+
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Insider|ARM64.Build.0 = Release|Any CPU
106+
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Insider|x64.ActiveCfg = Insider|Any CPU
107+
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Insider|x64.Build.0 = Insider|Any CPU
108+
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Insider|x86.ActiveCfg = Release|Any CPU
109+
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Insider|x86.Build.0 = Release|Any CPU
80110
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
81111
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Release|Any CPU.Build.0 = Release|Any CPU
82112
{E069A285-68FE-43C7-957F-9CC6BBF17BCE}.Release|ARM.ActiveCfg = Release|Any CPU
@@ -97,6 +127,16 @@ Global
97127
{43360223-1CD9-4962-84CC-0698F6D11837}.Debug|x64.Build.0 = Debug|Any CPU
98128
{43360223-1CD9-4962-84CC-0698F6D11837}.Debug|x86.ActiveCfg = Debug|Any CPU
99129
{43360223-1CD9-4962-84CC-0698F6D11837}.Debug|x86.Build.0 = Debug|Any CPU
130+
{43360223-1CD9-4962-84CC-0698F6D11837}.Insider|Any CPU.ActiveCfg = Release|Any CPU
131+
{43360223-1CD9-4962-84CC-0698F6D11837}.Insider|Any CPU.Build.0 = Release|Any CPU
132+
{43360223-1CD9-4962-84CC-0698F6D11837}.Insider|ARM.ActiveCfg = Release|Any CPU
133+
{43360223-1CD9-4962-84CC-0698F6D11837}.Insider|ARM.Build.0 = Release|Any CPU
134+
{43360223-1CD9-4962-84CC-0698F6D11837}.Insider|ARM64.ActiveCfg = Release|Any CPU
135+
{43360223-1CD9-4962-84CC-0698F6D11837}.Insider|ARM64.Build.0 = Release|Any CPU
136+
{43360223-1CD9-4962-84CC-0698F6D11837}.Insider|x64.ActiveCfg = Insider|Any CPU
137+
{43360223-1CD9-4962-84CC-0698F6D11837}.Insider|x64.Build.0 = Insider|Any CPU
138+
{43360223-1CD9-4962-84CC-0698F6D11837}.Insider|x86.ActiveCfg = Release|Any CPU
139+
{43360223-1CD9-4962-84CC-0698F6D11837}.Insider|x86.Build.0 = Release|Any CPU
100140
{43360223-1CD9-4962-84CC-0698F6D11837}.Release|Any CPU.ActiveCfg = Release|Any CPU
101141
{43360223-1CD9-4962-84CC-0698F6D11837}.Release|Any CPU.Build.0 = Release|Any CPU
102142
{43360223-1CD9-4962-84CC-0698F6D11837}.Release|ARM.ActiveCfg = Release|Any CPU
@@ -117,6 +157,16 @@ Global
117157
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Debug|x64.Build.0 = Debug|Any CPU
118158
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Debug|x86.ActiveCfg = Debug|Any CPU
119159
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Debug|x86.Build.0 = Debug|Any CPU
160+
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Insider|Any CPU.ActiveCfg = Release|Any CPU
161+
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Insider|Any CPU.Build.0 = Release|Any CPU
162+
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Insider|ARM.ActiveCfg = Release|Any CPU
163+
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Insider|ARM.Build.0 = Release|Any CPU
164+
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Insider|ARM64.ActiveCfg = Release|Any CPU
165+
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Insider|ARM64.Build.0 = Release|Any CPU
166+
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Insider|x64.ActiveCfg = Insider|Any CPU
167+
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Insider|x64.Build.0 = Insider|Any CPU
168+
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Insider|x86.ActiveCfg = Release|Any CPU
169+
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Insider|x86.Build.0 = Release|Any CPU
120170
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
121171
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Release|Any CPU.Build.0 = Release|Any CPU
122172
{CEBA2186-BA2C-4616-BEEE-01E0F899A4A1}.Release|ARM.ActiveCfg = Release|Any CPU
@@ -137,6 +187,16 @@ Global
137187
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Debug|x64.Build.0 = Debug|Any CPU
138188
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Debug|x86.ActiveCfg = Debug|Any CPU
139189
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Debug|x86.Build.0 = Debug|Any CPU
190+
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Insider|Any CPU.ActiveCfg = Release|Any CPU
191+
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Insider|Any CPU.Build.0 = Release|Any CPU
192+
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Insider|ARM.ActiveCfg = Release|Any CPU
193+
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Insider|ARM.Build.0 = Release|Any CPU
194+
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Insider|ARM64.ActiveCfg = Release|Any CPU
195+
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Insider|ARM64.Build.0 = Release|Any CPU
196+
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Insider|x64.ActiveCfg = Insider|Any CPU
197+
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Insider|x64.Build.0 = Insider|Any CPU
198+
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Insider|x86.ActiveCfg = Release|Any CPU
199+
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Insider|x86.Build.0 = Release|Any CPU
140200
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Release|Any CPU.ActiveCfg = Release|Any CPU
141201
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Release|Any CPU.Build.0 = Release|Any CPU
142202
{E20B2927-0C9E-437F-9B51-B76BAE2EF67C}.Release|ARM.ActiveCfg = Release|Any CPU
@@ -157,6 +217,16 @@ Global
157217
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Debug|x64.Build.0 = Debug|Any CPU
158218
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Debug|x86.ActiveCfg = Debug|Any CPU
159219
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Debug|x86.Build.0 = Debug|Any CPU
220+
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Insider|Any CPU.ActiveCfg = Debug|Any CPU
221+
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Insider|Any CPU.Build.0 = Debug|Any CPU
222+
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Insider|ARM.ActiveCfg = Debug|Any CPU
223+
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Insider|ARM.Build.0 = Debug|Any CPU
224+
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Insider|ARM64.ActiveCfg = Debug|Any CPU
225+
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Insider|ARM64.Build.0 = Debug|Any CPU
226+
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Insider|x64.ActiveCfg = Insider|Any CPU
227+
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Insider|x64.Build.0 = Insider|Any CPU
228+
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Insider|x86.ActiveCfg = Debug|Any CPU
229+
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Insider|x86.Build.0 = Debug|Any CPU
160230
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Release|Any CPU.ActiveCfg = Release|Any CPU
161231
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Release|Any CPU.Build.0 = Release|Any CPU
162232
{D5C342A2-FB47-4D19-8073-E7F15EE43F24}.Release|ARM.ActiveCfg = Release|Any CPU

src/API/Discord.API/Discord.API.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
<AssemblyVersion></AssemblyVersion>
65
</PropertyGroup>
76

87
<ItemGroup>

src/Quarrel.ViewModels/Services/Quips/IQuipService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Quarrel © 2022
22

3-
using Quarrel.Services.Quips.Model;
3+
using Quarrel.Services.Quips.Models;
44

55
namespace Quarrel.Services.Quips
66
{

src/Quarrel.ViewModels/Services/Quips/Model/Quip.cs renamed to src/Quarrel.ViewModels/Services/Quips/Models/Quip.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// JSON models don't need to respect standard nullable rules.
66
#pragma warning disable CS8618
77

8-
namespace Quarrel.Services.Quips.Model
8+
namespace Quarrel.Services.Quips.Models
99
{
1010
/// <summary>
1111
/// A quip with a creator.

src/Quarrel.ViewModels/Services/Quips/Model/QuipCreator.cs renamed to src/Quarrel.ViewModels/Services/Quips/Models/QuipCreator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// JSON models don't need to respect standard nullable rules.
77
#pragma warning disable CS8618
88

9-
namespace Quarrel.Services.Quips.Model
9+
namespace Quarrel.Services.Quips.Models
1010
{
1111
/// <summary>
1212
/// The creator of a quip.

src/Quarrel.ViewModels/Services/Quips/Model/QuipGroup.cs renamed to src/Quarrel.ViewModels/Services/Quips/Models/QuipGroup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Quarrel © 2022
22

3-
using Quarrel.Services.Quips.Model.Rules;
3+
using Quarrel.Services.Quips.Models.Rules;
44
using System;
55
using System.Collections.Generic;
66
using System.Globalization;
@@ -9,7 +9,7 @@
99
// JSON models don't need to respect standard nullable rules.
1010
#pragma warning disable CS8618
1111

12-
namespace Quarrel.Services.Quips.Model
12+
namespace Quarrel.Services.Quips.Models
1313
{
1414
/// <summary>
1515
/// A group of quips chosen at random.

src/Quarrel.ViewModels/Services/Quips/Model/Rules/DailyRangeRule.cs renamed to src/Quarrel.ViewModels/Services/Quips/Models/Rules/DailyRangeRule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
using System;
44

5-
namespace Quarrel.Services.Quips.Model.Rules
5+
namespace Quarrel.Services.Quips.Models.Rules
66
{
77
/// <summary>
88
/// A

src/Quarrel.ViewModels/Services/Quips/Model/Rules/ITimeSpanRule.cs renamed to src/Quarrel.ViewModels/Services/Quips/Models/Rules/ITimeSpanRule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
using System;
44

5-
namespace Quarrel.Services.Quips.Model.Rules
5+
namespace Quarrel.Services.Quips.Models.Rules
66
{
77
/// <summary>
88
/// An interface for checking if a time is within a constraint.

src/Quarrel.ViewModels/Services/Quips/QuipService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Quarrel © 2022
22

3-
using Quarrel.Services.Quips.Model;
3+
using Quarrel.Services.Quips.Models;
44
using System;
55
using System.Collections.Generic;
66

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Quarrel © 2022
2+
3+
namespace Quarrel.Services.Versioning.Enums
4+
{
5+
/// <summary>
6+
/// The type of app version.
7+
/// </summary>
8+
public enum VersionType
9+
{
10+
/// <summary>
11+
/// The app's version is release.
12+
/// </summary>
13+
Release,
14+
15+
/// <summary>
16+
/// The app's version is insider.
17+
/// </summary>
18+
Insider,
19+
20+
/// <summary>
21+
/// The app's version is development.
22+
/// </summary>
23+
Dev,
24+
25+
/// <summary>
26+
/// The app's version is in beta.
27+
/// </summary>
28+
Beta,
29+
30+
/// <summary>
31+
/// The app's version is in alpha.
32+
/// </summary>
33+
Alpha,
34+
}
35+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Quarrel © 2022
2+
3+
using Quarrel.Services.Versioning.Models;
4+
5+
namespace Quarrel.Services.Versioning
6+
{
7+
/// <summary>
8+
/// An interface for getting App and Git versioning service.
9+
/// </summary>
10+
public interface IVersioningService
11+
{
12+
/// <summary>
13+
/// Gets the app version information.
14+
/// </summary>
15+
AppVersion AppVersion { get; }
16+
17+
/// <summary>
18+
/// Gets the git version information.
19+
/// </summary>
20+
GitVersionInfo GitVersionInfo { get; }
21+
}
22+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Quarrel © 2022
2+
3+
using Quarrel.Services.Versioning.Enums;
4+
5+
namespace Quarrel.Services.Versioning.Models
6+
{
7+
/// <summary>
8+
/// A struct containing the app version information.
9+
/// </summary>
10+
public struct AppVersion
11+
{
12+
/// <summary>
13+
/// The app's major version.
14+
/// </summary>
15+
public ushort MajorVersion { get; set; }
16+
17+
/// <summary>
18+
/// The app's minor version.
19+
/// </summary>
20+
public ushort MinorVersion { get; set; }
21+
22+
/// <summary>
23+
/// The app's build number.
24+
/// </summary>
25+
public ushort BuildNumber { get; set; }
26+
27+
/// <summary>
28+
/// The app's version type.
29+
/// </summary>
30+
public VersionType VersionType { get; set; }
31+
}
32+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Quarrel © 2022
2+
3+
namespace Quarrel.Services.Versioning.Models
4+
{
5+
/// <summary>
6+
/// A struct containing git version info.
7+
/// </summary>
8+
public struct GitVersionInfo
9+
{
10+
/// <summary>
11+
/// The git commit the build was made from.
12+
/// </summary>
13+
public string Commit { get; set; }
14+
15+
/// <summary>
16+
/// The git branch the build was made from.
17+
/// </summary>
18+
public string Branch { get; set; }
19+
}
20+
}

src/Quarrel.ViewModels/ViewModels/SubPages/Meta/AboutPageViewModel.cs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Microsoft.Toolkit.Mvvm.Messaging;
66
using Quarrel.Messages.Navigation.SubPages;
77
using Quarrel.Services.Localization;
8+
using Quarrel.Services.Versioning;
89

910
namespace Quarrel.ViewModels.SubPages.Meta
1011
{
@@ -13,18 +14,45 @@ namespace Quarrel.ViewModels.SubPages.Meta
1314
/// </summary>
1415
public partial class AboutPageViewModel : ObservableRecipient
1516
{
17+
private const string CommitResource = "About/Commit";
18+
private const string BranchResource = "About/Branch";
1619
private readonly IMessenger _messenger;
1720
private readonly ILocalizationService _localizationService;
21+
private readonly IVersioningService _versioningService;
1822

1923
/// <summary>
2024
/// Initializes a new instance of the <see cref="AboutPageViewModel"/> class.
2125
/// </summary>
22-
public AboutPageViewModel(IMessenger messenger, ILocalizationService localizationService)
26+
public AboutPageViewModel(
27+
IMessenger messenger,
28+
ILocalizationService localizationService,
29+
IVersioningService versioningService)
2330
{
2431
_messenger = messenger;
2532
_localizationService = localizationService;
33+
_versioningService = versioningService;
2634
}
2735

36+
/// <summary>
37+
/// Gets the app version as a <see cref="string"/>.
38+
/// </summary>
39+
public string AppVersion => string.Format("{0}.{1}.{2}",
40+
_versioningService.AppVersion.MajorVersion,
41+
_versioningService.AppVersion.MinorVersion,
42+
_versioningService.AppVersion.BuildNumber);
43+
44+
/// <summary>
45+
/// Gets the commit info localized.
46+
/// </summary>
47+
public string CommitInfo => _localizationService
48+
[CommitResource, _versioningService.GitVersionInfo.Commit];
49+
50+
/// <summary>
51+
/// Gets the branch info localized.
52+
/// </summary>
53+
public string BranchInfo => _localizationService
54+
[BranchResource, _versioningService.GitVersionInfo.Branch];
55+
2856
/// <summary>
2957
/// Gets a value indicating whether or not the app's current language is the neutral language.
3058
/// </summary>

src/Quarrel/App.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Quarrel.Services.Localization;
1313
using Quarrel.Services.Storage;
1414
using Quarrel.Services.Storage.Models;
15+
using Quarrel.Services.Versioning;
1516
using Quarrel.ViewModels;
1617
using Quarrel.ViewModels.Panels;
1718
using Quarrel.ViewModels.SubPages;
@@ -90,6 +91,7 @@ private IServiceProvider ConfigureServices()
9091
var services = new ServiceCollection();
9192
services.AddSingleton<IMessenger, WeakReferenceMessenger>();
9293
services.AddSingleton<ILocalizationService, LocalizationService>();
94+
services.AddSingleton<IVersioningService, VersioningService>();
9395
services.AddSingleton<IDiscordService, DiscordService>();
9496
services.AddSingleton<IDispatcherService, DispatcherService>();
9597
services.AddSingleton<IStorageService>(new StorageService(appDataFolder, JsonAsyncSerializer.Singleton));

0 commit comments

Comments
 (0)