-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVersion.cs
More file actions
28 lines (26 loc) · 929 Bytes
/
Copy pathVersion.cs
File metadata and controls
28 lines (26 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System.IO;
using Microsoft.Extensions.Configuration;
namespace IcddWebApp
{
public static class Version
{
public static string GetVersionLink() {
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("version.json");
var configuration = builder.Build();
string commit = configuration["GitCommit"];
string url = configuration["GitUrl"];
return url + commit;
}
public static bool ShowVersion()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("version.json");
var configuration = builder.Build();
string show = configuration["GitReference"];
return show=="true";
}
}
}