Change to new layout
This commit is contained in:
parent
787722e72a
commit
688da54ceb
31
justfile
Normal file
31
justfile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
project_name := `printf '%s\n' "${PWD##*/}"`
|
||||||
|
uppercase_project_name := capitalize(project_name)
|
||||||
|
|
||||||
|
setup:
|
||||||
|
@mkdir src
|
||||||
|
@dotnet new sln --name src/{{project_name}}
|
||||||
|
@dotnet new classlib -o src/{{uppercase_project_name}}
|
||||||
|
@dotnet new xunit -o src/{{uppercase_project_name}}.Tests
|
||||||
|
@dotnet sln add src/{{uppercase_project_name}}/{{uppercase_project_name}}.csproj
|
||||||
|
@dotnet sln add src/{{uppercase_project_name}}.Tests/{{uppercase_project_name}}.Tests.csproj
|
||||||
|
@dotnet add src/{{uppercase_project_name}}/{{uppercase_project_name}}.csproj reference src/{{uppercase_project_name}}.Tests/{{uppercase_project_name}}.Tests.csproj
|
||||||
|
|
||||||
|
run:
|
||||||
|
@dotnet run
|
||||||
|
|
||||||
|
build:
|
||||||
|
@dotnet build src/{{uppercase_project_name}}/{{uppercase_project_name}}.csproj
|
||||||
|
@dotnet build src/{{uppercase_project_name}}.Tests/{{uppercase_project_name}}.Tests.csproj
|
||||||
|
|
||||||
|
publish:
|
||||||
|
@dotnet publish --configuration Release src/{{uppercase_project_name}}/{{uppercase_project_name}}.csproj
|
||||||
|
|
||||||
|
format:
|
||||||
|
@dotnet format src/{{uppercase_project_name}}
|
||||||
|
@dotnet format src/{{uppercase_project_name}}.Tests
|
||||||
|
|
||||||
|
test: build
|
||||||
|
@dotnet test src/{{uppercase_project_name}}.Tests
|
10
src/Update-csharp.Tests/UnitTest1.cs
Normal file
10
src/Update-csharp.Tests/UnitTest1.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace Update_csharp.Tests;
|
||||||
|
|
||||||
|
public class UnitTest1
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public void Test1()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
25
src/Update-csharp.Tests/Update-csharp.Tests.csproj
Normal file
25
src/Update-csharp.Tests/Update-csharp.Tests.csproj
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<RootNamespace>Update_csharp.Tests</RootNamespace>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||||
|
<PackageReference Include="xunit" Version="2.4.2" />
|
||||||
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
1
src/Update-csharp.Tests/Usings.cs
Normal file
1
src/Update-csharp.Tests/Usings.cs
Normal file
@ -0,0 +1 @@
|
|||||||
|
global using Xunit;
|
@ -3,6 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<RootNamespace>Update_csharp</RootNamespace>
|
||||||
<PublishSingleFile>true</PublishSingleFile>
|
<PublishSingleFile>true</PublishSingleFile>
|
||||||
<SelfContained>true</SelfContained>
|
<SelfContained>true</SelfContained>
|
||||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||||
@ -10,9 +11,14 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.IO.Compression.ZipFile" />
|
<Reference Include="System.IO.Compression.ZipFile" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Update-csharp.Tests\Update-csharp.Tests.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
28
src/update-csharp.sln
Normal file
28
src/update-csharp.sln
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.0.31903.59
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update-csharp", "Update-csharp\Update-csharp.csproj", "{6FE9BE72-7118-4CC5-AC47-20F5E145FA67}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update-csharp.Tests", "Update-csharp.Tests\Update-csharp.Tests.csproj", "{F66860FA-9516-458E-87F3-245AC885AB96}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{6FE9BE72-7118-4CC5-AC47-20F5E145FA67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{6FE9BE72-7118-4CC5-AC47-20F5E145FA67}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{6FE9BE72-7118-4CC5-AC47-20F5E145FA67}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{6FE9BE72-7118-4CC5-AC47-20F5E145FA67}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{F66860FA-9516-458E-87F3-245AC885AB96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{F66860FA-9516-458E-87F3-245AC885AB96}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{F66860FA-9516-458E-87F3-245AC885AB96}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{F66860FA-9516-458E-87F3-245AC885AB96}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
Loading…
Reference in New Issue
Block a user