-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
72 lines (54 loc) · 1.87 KB
/
Justfile
File metadata and controls
72 lines (54 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Justfile .NET - BEN ABT 2025 - https://benjamin-abt.com
set shell := ["pwsh", "-c"]
# ===== Configurable defaults =====
CONFIG := "Debug"
TFM := "net10.0"
# ===== Default / Help =====
default: help
help:
# Overview:
just --list
# Usage:
# just build
# just test
# just pack
# ===== Basic .NET Workflows =====
restore:
dotnet restore
build *ARGS:
dotnet build --configuration "{{CONFIG}}" --nologo --verbosity minimal {{ARGS}}
rebuild *ARGS:
dotnet build --configuration "{{CONFIG}}" --nologo --verbosity minimal --no-incremental {{ARGS}}
clean:
dotnet clean --configuration "{{CONFIG}}" --nologo
# ===== Quality / Tests =====
format:
dotnet format --verbosity minimal
format-check:
dotnet format --verify-no-changes --verbosity minimal
# xunit.v3 uses Microsoft Testing Platform (MTP) - run tests via dotnet run (not dotnet test)
test *ARGS:
dotnet run --project "tests/AssemblyMetadata.UnitTests/AssemblyMetadata.UnitTests.csproj" --configuration "{{CONFIG}}" --framework "{{TFM}}" {{ARGS}}
test-cov:
dotnet test --configuration "{{CONFIG}}" --nologo -- --coverage --coverage-output "./TestResults/coverage/coverage.xml" --coverage-output-format xml
test-filter QUERY:
dotnet run --project "tests/AssemblyMetadata.UnitTests/AssemblyMetadata.UnitTests.csproj" --configuration "{{CONFIG}}" --framework "{{TFM}}" -- --filter "{{QUERY}}"
# ===== Packaging / Release =====
pack *ARGS:
dotnet pack --configuration "{{CONFIG}}" --nologo --verbosity minimal -o "./artifacts/packages" {{ARGS}}
# ===== Housekeeping =====
clean-artifacts:
if (Test-Path "./artifacts") { Remove-Item "./artifacts" -Recurse -Force }
clean-all:
just clean
just clean-artifacts
# ===== Combined Flows =====
fmt-build:
just format
just build
ci:
just clean
just restore
just format-check
just build
just test