Expose git version in 'pk;stats' and '/v1/meta'

This commit is contained in:
spiral
2021-08-01 15:22:23 -04:00
parent dcc15dc847
commit 1cb4bc9287
9 changed files with 54 additions and 5 deletions

View File

@@ -32,6 +32,7 @@ namespace PluralKit.API
var o = new JObject();
o.Add("shards", shards.ToJSON());
o.Add("version", BuildInfoService.Version);
return Ok(o);
}

View File

@@ -1,4 +1,6 @@
using Autofac.Extensions.DependencyInjection;
using System.Threading.Tasks;
using Autofac.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
@@ -12,10 +14,11 @@ namespace PluralKit.API
{
public class Program
{
public static void Main(string[] args)
public static async Task Main(string[] args)
{
InitUtils.InitStatic();
CreateHostBuilder(args).Build().Run();
await BuildInfoService.LoadVersion();
await CreateHostBuilder(args).Build().RunAsync();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>