Build auth API
This commit is contained in:
commit
dafe603a06
43 changed files with 1153 additions and 0 deletions
10
build/.editorconfig
Normal file
10
build/.editorconfig
Normal file
|
@ -0,0 +1,10 @@
|
|||
[*.cs]
|
||||
dotnet_style_qualification_for_field = false:warning
|
||||
dotnet_style_qualification_for_property = false:warning
|
||||
dotnet_style_qualification_for_method = false:warning
|
||||
dotnet_style_qualification_for_event = false:warning
|
||||
dotnet_style_require_accessibility_modifiers = never:warning
|
||||
|
||||
csharp_style_expression_bodied_properties = true:warning
|
||||
csharp_style_expression_bodied_indexers = true:warning
|
||||
csharp_style_expression_bodied_accessors = true:warning
|
62
build/Build.cs
Normal file
62
build/Build.cs
Normal file
|
@ -0,0 +1,62 @@
|
|||
using Nuke.Common;
|
||||
using Nuke.Common.Execution;
|
||||
using Nuke.Common.IO;
|
||||
using Nuke.Common.ProjectModel;
|
||||
using Nuke.Common.Tools.DotNet;
|
||||
using Nuke.Common.Utilities.Collections;
|
||||
using static Nuke.Common.IO.FileSystemTasks;
|
||||
using static Nuke.Common.Tools.DotNet.DotNetTasks;
|
||||
|
||||
[CheckBuildProjectConfigurations]
|
||||
[UnsetVisualStudioEnvironmentVariables]
|
||||
class Build : NukeBuild {
|
||||
|
||||
public static int Main() => Execute<Build>(x => x.Publish);
|
||||
|
||||
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
||||
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
|
||||
|
||||
[Solution] readonly Solution Solution;
|
||||
|
||||
AbsolutePath SourceDirectory => RootDirectory / "src";
|
||||
AbsolutePath OutputDirectory => RootDirectory / "output";
|
||||
|
||||
Target Clean => _ => _
|
||||
.Before(Restore)
|
||||
.Executes(() => {
|
||||
SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(DeleteDirectory);
|
||||
EnsureCleanDirectory(OutputDirectory);
|
||||
});
|
||||
|
||||
Target Restore => _ => _
|
||||
.Executes(() => {
|
||||
DotNetRestore(s => s
|
||||
.SetProjectFile(Solution));
|
||||
});
|
||||
|
||||
Target Compile => _ => _
|
||||
.DependsOn(Restore)
|
||||
.Executes(() => {
|
||||
DotNetBuild(s => s
|
||||
.SetProjectFile(Solution)
|
||||
.SetConfiguration(Configuration)
|
||||
.EnableNoRestore());
|
||||
});
|
||||
|
||||
Target Test => _ => _
|
||||
.DependsOn(Compile)
|
||||
.Executes(() => {
|
||||
DotNetTest(s => s
|
||||
.SetProjectFile(Solution)
|
||||
.EnableNoRestore());
|
||||
});
|
||||
|
||||
Target Publish => _ => _
|
||||
.DependsOn(Test)
|
||||
.Executes(() => {
|
||||
DotNetPublish(s => s
|
||||
.SetProject(SourceDirectory / "Robware.Api.Auth/Robware.Api.Auth.csproj")
|
||||
.SetConfiguration(Configuration)
|
||||
.SetOutput(OutputDirectory));
|
||||
});
|
||||
}
|
34
build/_build.csproj
Normal file
34
build/_build.csproj
Normal file
|
@ -0,0 +1,34 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<RootNamespace></RootNamespace>
|
||||
<IsPackable>False</IsPackable>
|
||||
<NoWarn>CS0649;CS0169</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nuke.Common" Version="0.24.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<NukeSpecificationFiles Include="**\*.json" Exclude="bin\**;obj\**" />
|
||||
<NukeExternalFiles Include="**\*.*.ext" Exclude="bin\**;obj\**" />
|
||||
<None Remove="*.csproj.DotSettings;*.ref.*.txt" />
|
||||
|
||||
<!-- Common build related files -->
|
||||
<None Include="..\build.ps1" />
|
||||
<None Include="..\build.sh" />
|
||||
<None Include="..\.nuke" />
|
||||
<None Include="..\global.json" Condition="Exists('..\global.json')" />
|
||||
<None Include="..\nuget.config" Condition="Exists('..\nuget.config')" />
|
||||
<None Include="..\azure-pipelines.yml" Condition="Exists('..\azure-pipelines.yml')" />
|
||||
<None Include="..\Jenkinsfile" Condition="Exists('..\Jenkinsfile')" />
|
||||
<None Include="..\appveyor.yml" Condition="Exists('..\appveyor.yml')" />
|
||||
<None Include="..\.travis.yml" Condition="Exists('..\.travis.yml')" />
|
||||
<None Include="..\GitVersion.yml" Condition="Exists('..\GitVersion.yml')" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue