-
Notifications
You must be signed in to change notification settings - Fork 0
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 #3 from RTUITLab/develop
v5.0
- Loading branch information
Showing
23 changed files
with
481 additions
and
335 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
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,115 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"$ref": "#/definitions/build", | ||
"title": "Build Schema", | ||
"definitions": { | ||
"build": { | ||
"type": "object", | ||
"properties": { | ||
"Configuration": { | ||
"type": "string", | ||
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", | ||
"enum": [ | ||
"Debug", | ||
"Release" | ||
] | ||
}, | ||
"Continue": { | ||
"type": "boolean", | ||
"description": "Indicates to continue a previously failed build attempt" | ||
}, | ||
"Help": { | ||
"type": "boolean", | ||
"description": "Shows the help text for this build assembly" | ||
}, | ||
"Host": { | ||
"type": "string", | ||
"description": "Host for execution. Default is 'automatic'", | ||
"enum": [ | ||
"AppVeyor", | ||
"AzurePipelines", | ||
"Bamboo", | ||
"Bitbucket", | ||
"Bitrise", | ||
"GitHubActions", | ||
"GitLab", | ||
"Jenkins", | ||
"Rider", | ||
"SpaceAutomation", | ||
"TeamCity", | ||
"Terminal", | ||
"TravisCI", | ||
"VisualStudio", | ||
"VSCode" | ||
] | ||
}, | ||
"NoLogo": { | ||
"type": "boolean", | ||
"description": "Disables displaying the NUKE logo" | ||
}, | ||
"Partition": { | ||
"type": "string", | ||
"description": "Partition to use on CI" | ||
}, | ||
"Plan": { | ||
"type": "boolean", | ||
"description": "Shows the execution plan (HTML)" | ||
}, | ||
"Profile": { | ||
"type": "array", | ||
"description": "Defines the profiles to load", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"Root": { | ||
"type": "string", | ||
"description": "Root directory during build execution" | ||
}, | ||
"Runtime": { | ||
"type": "string" | ||
}, | ||
"Skip": { | ||
"type": "array", | ||
"description": "List of targets to be skipped. Empty list skips all dependencies", | ||
"items": { | ||
"type": "string", | ||
"enum": [ | ||
"Clean", | ||
"Compile", | ||
"Publish", | ||
"Restore" | ||
] | ||
} | ||
}, | ||
"Solution": { | ||
"type": "string", | ||
"description": "Path to a solution file that is automatically loaded" | ||
}, | ||
"Target": { | ||
"type": "array", | ||
"description": "List of targets to be invoked. Default is '{default_target}'", | ||
"items": { | ||
"type": "string", | ||
"enum": [ | ||
"Clean", | ||
"Compile", | ||
"Publish", | ||
"Restore" | ||
] | ||
} | ||
}, | ||
"Verbosity": { | ||
"type": "string", | ||
"description": "Logging verbosity during build execution. Default is 'Normal'", | ||
"enum": [ | ||
"Minimal", | ||
"Normal", | ||
"Quiet", | ||
"Verbose" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
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,4 @@ | ||
{ | ||
"$schema": "./build.schema.json", | ||
"Solution": "Excursion360.Desktop.sln" | ||
} |
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
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 |
---|---|---|
@@ -1,41 +1,23 @@ | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Logging; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Microsoft.Extensions.Hosting; | ||
using Microsoft.AspNetCore.Hosting.Server; | ||
using Microsoft.AspNetCore.Hosting.Server; | ||
using Microsoft.AspNetCore.Hosting.Server.Features; | ||
using System.Linq; | ||
using Microsoft.AspNetCore.Http.Features; | ||
|
||
namespace Excursion360.Desktop | ||
namespace Excursion360.Desktop; | ||
|
||
static class Extensions | ||
{ | ||
static class Extensions | ||
public static ILogger CreateLogger(this IWebHost host, string categoryName) | ||
=> host.Services.GetRequiredService<ILoggerFactory>().CreateLogger(categoryName); | ||
public static Uri GetListeningUri(this IHost host) | ||
{ | ||
public static ILogger CreateLogger(this IWebHost host, string categoryName) | ||
{ | ||
return host.Services.GetService<ILoggerFactory>().CreateLogger(categoryName); | ||
} | ||
public static Uri GetListeningUri(this IHost host) | ||
{ | ||
return new Uri(host.Services | ||
.GetRequiredService<IServer>() | ||
.Features | ||
.Get<IServerAddressesFeature>() | ||
.Addresses | ||
.Single(a => a.StartsWith("http:", StringComparison.Ordinal))); | ||
} | ||
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) | ||
{ | ||
HashSet<TKey> seenKeys = new HashSet<TKey>(); | ||
foreach (TSource element in source) | ||
{ | ||
if (seenKeys.Add(keySelector(element))) | ||
{ | ||
yield return element; | ||
} | ||
} | ||
} | ||
return new Uri(host.Services | ||
.GetRequiredService<IServer>() | ||
.Features | ||
.GetRequiredFeature<IServerAddressesFeature>() | ||
.Addresses | ||
.Single(a => a.StartsWith("http:", StringComparison.Ordinal))); | ||
} | ||
|
||
public static string ExcursionDirectoryPath(this IConfiguration configuration) | ||
=> configuration.GetValue<string?>("excursionsPath", null) ?? Directory.GetCurrentDirectory(); | ||
} |
Oops, something went wrong.