Skip to content

Commit

Permalink
Merge pull request #40 from KuraiAndras/develop
Browse files Browse the repository at this point in the history
0.6.0
  • Loading branch information
KuraiAndras authored Apr 18, 2021
2 parents 56dcef9 + 9084006 commit 05abe0b
Show file tree
Hide file tree
Showing 257 changed files with 2,321 additions and 271 deletions.
12 changes: 0 additions & 12 deletions .config/dotnet-tools.json

This file was deleted.

2 changes: 2 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"Restore",
"RunCi",
"RunFormat",
"Test",
"UnInstallCli"
]
}
Expand All @@ -108,6 +109,7 @@
"Restore",
"RunCi",
"RunFormat",
"Test",
"UnInstallCli"
]
}
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/CsprojToAsmdef.Cli/bin/Debug/net5.0/CsprojToAsmdef.Cli.dll",
"program": "${workspaceFolder}/Sources/CsprojToAsmdef.Cli/bin/Debug/net5.0/CsprojToAsmdef.Cli.dll",
"args": [],
"cwd": "${workspaceFolder}/CsprojToAsmdef.Cli",
"cwd": "${workspaceFolder}/Sources/CsprojToAsmdef.Cli",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
Expand Down
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/CsprojToAsmdef.Cli/CsprojToAsmdef.Cli.csproj",
"${workspaceFolder}/Sources/CsprojToAsmdef.Cli/CsprojToAsmdef.Cli.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -19,7 +19,7 @@
"type": "process",
"args": [
"publish",
"${workspaceFolder}/CsprojToAsmdef.Cli/CsprojToAsmdef.Cli.csproj",
"${workspaceFolder}/Sources/CsprojToAsmdef.Cli/CsprojToAsmdef.Cli.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -32,7 +32,7 @@
"args": [
"watch",
"run",
"${workspaceFolder}/CsprojToAsmdef.Cli/CsprojToAsmdef.Cli.csproj",
"${workspaceFolder}/Sources/CsprojToAsmdef.Cli/CsprojToAsmdef.Cli.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand Down
19 changes: 19 additions & 0 deletions Build/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
root = true

[*.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_methods = true:silent
csharp_style_expression_bodied_properties = true:warning
csharp_style_expression_bodied_indexers = true:warning
csharp_style_expression_bodied_accessors = true:warning

# CA1050: Declare types in namespaces
dotnet_diagnostic.CA1050.severity = none

# IDE0051: Remove unused private members
dotnet_diagnostic.IDE0051.severity = none
13 changes: 11 additions & 2 deletions CsprojToAsmdef.Build/Build.cs → Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ partial class Build : NukeBuild
.EnableNoIncremental()
.EnableNoRestore()));

Target Test => _ => _
.DependsOn(BuildCli)
.Executes(() =>
DotNetTest(s => s
.SetProjectFile(Solution)
.SetConfiguration(Configuration)
.EnableNoBuild()
.EnableNoRestore()));

public static int Main() => Execute<Build>(x => x.BuildAll);

protected override void OnBuildInitialized()
Expand Down Expand Up @@ -83,12 +92,12 @@ string GetCurrentVersion()
var jsonContent = File.ReadAllText(packagePath);
var package = JsonSerializer.Deserialize<PackageJson>(jsonContent, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });

if (package?.Version is null) throw new InvalidOperationException($"Cloud not deserialize package.json:\n{jsonContent}");
if (package?.Version is null) throw new InvalidOperationException($"Cloud not deserialize package.json:{Environment.NewLine}{jsonContent}");

return package.Version;
}

PackageDirectory = Path.Combine(Solution.Directory, "CsprojToAsmdef", "Assets", "CsprojToAsmdef");
PackageDirectory = Solution.AllProjects.Single(p => p.Name == "CsprojToAsmdef").Directory;
CurrentVersion = GetCurrentVersion();
IsNewestVersion = GetIsNewestVersion();
CliProject = Solution.AllProjects.Single(p => p.Name == "CsprojToAsmdef.Cli");
Expand Down
1 change: 1 addition & 0 deletions CsprojToAsmdef.Build/Ci.cs → Build/Ci.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ partial class Build
Target RunCi => _ => _
.DependsOn(CheckFormatting)
.DependsOn(InstallCli)
.DependsOn(Test)
.Executes(() =>
{
});
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169;SA1633;SA1200</NoWarn>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
<NukeScriptDirectory>..</NukeScriptDirectory>
</PropertyGroup>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions CsprojToAsmdef.Build/NuGet.cs → Build/NuGet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Utilities.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Text;
Expand All @@ -13,7 +12,6 @@

partial class Build
{
[SuppressMessage("Minor Code Smell", "S1075:URIs should not be hardcoded", Justification = "Will only ever publish on Nuget.org")]
const string NugetApiUrl = "https://api.nuget.org/v3/index.json";

[Parameter("NuGet API key to use for authentication with the NuGet server")]
Expand Down
File renamed without changes.
73 changes: 0 additions & 73 deletions CsprojToAsmdef.Build/.editorconfig

This file was deleted.

Loading

0 comments on commit 05abe0b

Please sign in to comment.