pacserver/justfile

32 lines
1.1 KiB
Makefile
Raw Normal View History

2023-06-03 12:08:00 +02:00
default:
@just --list
2023-06-05 00:18:00 +02:00
project_name := `printf '%s\n' "${PWD##*/}"`
uppercase_project_name := capitalize(project_name)
setup:
@dotnet new sln --name {{project_name}}
@mkdir src
@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
2023-06-03 12:08:00 +02:00
run:
@dotnet run
build:
2023-06-15 20:23:25 +02:00
@dotnet build src/{{uppercase_project_name}}/{{project_name}}.csproj
@dotnet build src/{{uppercase_project_name}}.Tests/{{uppercase_project_name}}.Tests.csproj
2023-06-03 12:08:00 +02:00
2023-06-03 14:55:11 +02:00
publish: format
2023-06-15 20:23:25 +02:00
@dotnet publish --configuration Release src/{{uppercase_project_name}}/{{project_name}}.csproj
2023-06-03 14:55:11 +02:00
format:
2023-06-15 20:23:25 +02:00
@dotnet format src/{{uppercase_project_name}}
@dotnet format src/{{uppercase_project_name}}.Tests
test: build
2023-06-15 20:23:25 +02:00
@dotnet test src/{{uppercase_project_name}}.Tests