44 lines
828 B
Makefile
44 lines
828 B
Makefile
# ServerPack build commands
|
|
# Install just: https://github.com/casey/just
|
|
|
|
set dotenv-load
|
|
|
|
src_path := "src"
|
|
test_path := "tests"
|
|
dist_path := "dist"
|
|
pack_path := "../../packages"
|
|
|
|
# Default recipe - show available commands
|
|
default:
|
|
@just --list
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
rm -rf {{dist_path}}
|
|
|
|
# Build production bundle
|
|
bundle: clean
|
|
dotnet publish -c Release -o {{dist_path}} {{src_path}}
|
|
|
|
# Build debug bundle
|
|
bundle-debug: clean
|
|
dotnet publish -c Debug -o {{dist_path}} {{src_path}}
|
|
|
|
# Create NuGet package
|
|
pack: clean
|
|
dotnet pack -c Release -o {{pack_path}} {{src_path}}
|
|
|
|
# Format code with Fantomas
|
|
format:
|
|
fantomas {{src_path}} -r
|
|
|
|
# Run tests
|
|
test: clean
|
|
#!/usr/bin/env bash
|
|
if [ -d "{{test_path}}" ]; then
|
|
dotnet run {{test_path}}
|
|
fi
|
|
|
|
# Run (creates package)
|
|
run: pack
|