-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmise.toml
More file actions
52 lines (43 loc) · 1.42 KB
/
mise.toml
File metadata and controls
52 lines (43 loc) · 1.42 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
[tools]
dotnet = '10'
[env]
PROJECT = "./api/api.csproj"
# Use 'container' on macOS, 'docker' elsewhere. Override with CONTAINER_CMD env var.
CONTAINER_CMD = "{% if env.CONTAINER_CMD %}{{ env.CONTAINER_CMD }}{% elif os() == 'macos' %}container{% else %}docker{% endif %}"
[tasks.build]
description = "Build the project"
run = "dotnet build $PROJECT"
[tasks.serve]
description = "Run the development server"
run = "dotnet run --project $PROJECT"
[tasks.clean]
description = "Clean build objects"
run = """
rm -rf ./api/bin/* ./api/obj/*
rm -rf './Data Helper/bin/'* './Data Helper/obj/'*
"""
[tasks.docker-build]
description = "Build and tag the container image"
run = "$CONTAINER_CMD build -f api/Dockerfile api -t pfapi:latest"
[tasks.docker-run]
description = "Build, tag, and run the container image binding to :8080"
depends = ["docker-build"]
run = "$CONTAINER_CMD run -it --rm -d -p 8080:80 pfapi:latest"
[tasks.migratedb]
description = "Add and run migrations (usage: mise run migratedb <name>)"
run = """
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Usage: mise run migratedb <migration_name>"
exit 1
fi
dotnet ef migrations add "$1" --project $PROJECT
dotnet ef database update --project $PROJECT
"""
[tasks."tools:install"]
description = "Installs or restores local dotnet tools"
run = "dotnet tool restore"
[tasks.upgrade-deps]
description = "Update dotnet dependencies"
depends = ['tools:install']
run = "dotnet outdated --upgrade"