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

Commit 9b4c18d

Browse files
committed
Always use the full version of the package
1 parent b7106fb commit 9b4c18d

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

common/SolutionInfo.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
using System.Runtime.InteropServices;
77

88
[assembly: AssemblyProduct("GitHub for Unity")]
9-
[assembly: AssemblyVersion(System.AssemblyVersionInformation.Version)]
10-
[assembly: AssemblyFileVersion(System.AssemblyVersionInformation.Version)]
9+
[assembly: AssemblyVersion(System.AssemblyVersionInformation.VersionForAssembly)]
10+
[assembly: AssemblyFileVersion(System.AssemblyVersionInformation.VersionForAssembly)]
1111
[assembly: AssemblyInformationalVersion(System.AssemblyVersionInformation.Version)]
1212
[assembly: ComVisible(false)]
1313
[assembly: AssemblyCompany("GitHub, Inc.")]
@@ -31,6 +31,9 @@
3131
namespace System
3232
{
3333
internal static class AssemblyVersionInformation {
34-
internal const string Version = "0.33.1";
34+
// this is for the AssemblyVersion and AssemblyVersion attributes, which can't handle alphanumerics
35+
internal const string VersionForAssembly = "0.33.1";
36+
// Actual real version
37+
internal const string Version = "0.33.1-beta";
3538
}
3639
}

src/GitHub.Api/Application/ApplicationConfiguration.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@ namespace GitHub.Unity
55
public static class ApplicationConfiguration
66
{
77
public const int DefaultWebTimeout = 3000;
8-
9-
static ApplicationConfiguration()
10-
{
11-
var executingAssembly = typeof(ApplicationConfiguration).Assembly;
12-
AssemblyName = executingAssembly.GetName();
13-
}
14-
15-
/// <summary>
16-
/// The currently executing assembly.
17-
/// </summary>
18-
public static AssemblyName AssemblyName { get; }
19-
208
public static int WebTimeout { get; set; } = DefaultWebTimeout;
219
}
2210
}

src/GitHub.Api/Metrics/UsageTracker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public UsageTracker(IMetricsService metricsService, ISettings userSettings,
3737
this.usageLoader = usageLoader;
3838
this.metricsService = metricsService;
3939
this.userId = userId;
40-
this.appVersion = ApplicationConfiguration.AssemblyName.Version.ToString();
40+
this.appVersion = ApplicationInfo.Version;
4141
this.unityVersion = unityVersion;
4242
this.instanceId = instanceId;
4343

src/tests/IntegrationTests/Metrics/MetricsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class MetricsTests : BaseIntegrationTest
2929
public void IncrementMetricsWorks(string measureName)
3030
{
3131
var userId = Guid.NewGuid().ToString();
32-
var appVersion = ApplicationConfiguration.AssemblyName.Version.ToString();
32+
var appVersion = ApplicationInfo.Version;
3333
var unityVersion = "2017.3f1";
3434
var instanceId = Guid.NewGuid().ToString();
3535
var usageLoader = Substitute.For<IUsageLoader>();
@@ -54,7 +54,7 @@ public void LoadingWorks()
5454
{
5555
InitializeEnvironment(TestBasePath, false, false);
5656
var userId = Guid.NewGuid().ToString();
57-
var appVersion = ApplicationConfiguration.AssemblyName.Version.ToString();
57+
var appVersion = ApplicationInfo.Version;
5858
var unityVersion = "2017.3f1";
5959
var instanceId = Guid.NewGuid().ToString();
6060
var usageStore = new UsageStore();

0 commit comments

Comments
 (0)