-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from argon-chat/feature/heading-endpoint
GitVersion + Heading Action Endpoint
- Loading branch information
Showing
7 changed files
with
93 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<InvariantGlobalization>true</InvariantGlobalization> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<LangVersion>latest</LangVersion> | ||
<Version>0.1</Version> | ||
<EnablePreviewFeatures>true</EnablePreviewFeatures> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</CurrentYear> | ||
<PackageProjectUrl>https://github.com/argon-chat/server</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/argon-chat/server</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<Copyright>(C) 2024-$(CurrentYear) Contributors of the Argon repository</Copyright> | ||
<Authors>Yuuki Wesp, Aram Hayrapetyan, and all contributors of the Argon repository (argon-chat/server)</Authors> | ||
<Company>Argon Chat</Company> | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<NoWarn>CS0162,CS8981,CS8632,CS9113,CS8618,CS9113,CS8321,CS0219,CS1998,IDE0053</NoWarn> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
mode: ContinuousDelivery | ||
assembly-file-versioning-format: '{Major}.{Minor}.{Patch}.{CommitsSinceVersionSource}' | ||
assembly-informational-format: '{Major}.{Minor}.{Patch}.{CommitsSinceVersionSource}-{BranchName}+{ShortSha}' | ||
merge-message-formats: {} | ||
commit-message-incrementing: Enabled | ||
patch-version-bump-message: "^(add|bump|drop|mv|move|update|expose|remove|refactoring|additional|use|improvement|fix|refactor)(.+)?" | ||
tag-prefix: 'IGNORE' | ||
next-version: "0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
namespace Argon.Api.Controllers; | ||
|
||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
[ApiController] | ||
public class MetadataController : ControllerBase | ||
{ | ||
[Route("/cfg.json")] | ||
[AllowAnonymous] | ||
public ValueTask<HeadRoutingConfig> GetHead() => | ||
new(new HeadRoutingConfig( | ||
$"{GlobalVersion.FullSemVer}.{GlobalVersion.ShortSha}", | ||
"api.argon.gl", | ||
"argon-f14ic5ia.livekit.cloud", | ||
[ | ||
new RegionalNode("cdn-ru1.argon.gl", "ru1"), | ||
new RegionalNode("cdn-ru2.argon.gl", "ru1"), | ||
new RegionalNode("cdn-as1.argon.gl", "as1") | ||
], [ | ||
new FeatureFlag("dev.window", true), | ||
new FeatureFlag("user.allowServerCreation", true), | ||
])); | ||
} | ||
|
||
public record HeadRoutingConfig( | ||
string version, | ||
string masterEndpoint, | ||
string webRtcEndpoint, | ||
List<RegionalNode> cdnAddresses, | ||
List<FeatureFlag> features | ||
); | ||
|
||
public record RegionalNode(string url, string code); | ||
|
||
public record FeatureFlag(string code, bool enabled); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Argon.Api; | ||
|
||
public static class GlobalVersion | ||
{ | ||
public static string BranchName => GitVersionInformation.BranchName; | ||
public static string AssemblySemFileVer => GitVersionInformation.AssemblySemFileVer; | ||
public static string AssemblySemVer => GitVersionInformation.AssemblySemVer; | ||
public static string CommitDate => GitVersionInformation.CommitDate; | ||
public static string BuildMetaData => GitVersionInformation.BuildMetaData; | ||
public static string FullSemVer => GitVersionInformation.FullSemVer; | ||
public static string InformationalVersion => GitVersionInformation.InformationalVersion; | ||
public static string Major => GitVersionInformation.Major; | ||
public static string Minor => GitVersionInformation.Minor; | ||
public static string Patch => GitVersionInformation.Patch; | ||
public static string Sha => GitVersionInformation.Sha; | ||
public static string ShortSha => GitVersionInformation.ShortSha; | ||
public static string PreReleaseTag => GitVersionInformation.PreReleaseTag; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters