Repository navigation
Expand file tree
/
Copy pathtaskfile.yml
More file actions
105 lines (87 loc) · 3.03 KB
/
Copy pathtaskfile.yml
File metadata and controls
105 lines (87 loc) · 3.03 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: "3"
silent: true
vars:
APPHOST: ./Ogma3.AppHost/Ogma3.AppHost.csproj
tasks:
watch: dotnet watch --project {{.APPHOST}} -- --allow-dirty=true
watch-dbg:
env:
Microsoft_CodeAnalysis_EditAndContinue_LogDir: '{{.TASKFILE_DIR | toSlash}}/.logs/{{now | date "2006-01-02_15-04-05"}}'
cmds:
- echo "Logging to $Microsoft_CodeAnalysis_EditAndContinue_LogDir"
- dotnet watch --verbose --project {{.APPHOST}} -- --allow-dirty=true
run-prod: dotnet run -c release --project {{.APPHOST}} -- --emulate-prod
# Generate JS API clients based on Swagger
paths:
env:
DENO_TLS_CA_STORE: system
vars:
DEST: ./FrontendCode/typescript/generated/
URL: https://localhost:5001/openapi/
cmds:
- ogma-tool generate-paths {{.DEST}} --path.public="{{.URL}}public.json" --path.internal="{{.URL}}internal.json"
packageguard:
cmds:
- cd ./FrontendCode && npm i --package-lock-only --legacy-peer-deps && cd ..
- defer: rm -f ./FrontendCode/package-lock.json
- packageguard --config-path .packageguard/config.json --npm-path ./FrontendCode .
sbom:
vars:
DEST: ./Documentation/sbom
cmds:
- syft . -o spdx-json={{.DEST}}/spdx.json -o cyclonedx-json={{.DEST}}/cdx.json
- cd {{.DEST}} && bun fmt
# Check the size of the bundle
bundlesize:
vars:
SRC: ./Ogma3/wwwroot/js/*.js ./Ogma3/wwwroot/js/**/*.js
cmds:
- ogma-tool bundle-size {{.SRC}}
# EF helpers
db-migrate:
aliases: [ dbm ]
cmds:
- dotnet ef migrations add {{.CLI_ARGS}}
db-unmigrate:
aliases: [ dbu ]
cmds:
- dotnet ef migrations remove --offline {{.CLI_ARGS}}
db-compile:
aliases: [ dbc ]
prompt: Currently blocked by https://github.com/dotnet/efcore/issues/24897. Do you want to continue?
cmds:
- dotnet ef dbcontext optimize --output-dir CompiledModels --namespace CompiledModels {{.CLI_ARGS}}
# Frontend
build-front:
dir: ./FrontendCode
cmd: bun run --parallel "*:prod"
watch-front:
dir: ./FrontendCode
cmd: bun run --parallel "*:watch"
lint-report: dotnet run ./.scripts/LintReport.cs
# Requires https://github.com/fonttools/fonttools
subset-fonts:
cmds:
- for:
matrix:
FONT:
- 'IMFellEnglish-Italic.ttf'
- 'IMFellEnglish-Regular.ttf'
FMT: ['woff', 'woff2']
cmd: >-
pyftsubset "./FrontendCode/fonts/{{.ITEM.FONT}}"
--unicodes="U+0020-007E"
--hinting
--flavor={{.ITEM.FMT}}
--output-file="./Ogma3/wwwroot/fonts/{{ regexReplaceAll `\.\w+$` .ITEM.FONT (printf ".%s" .ITEM.FMT) }}"
# Deploy
deploy:
cmds:
- task: build-front
- task: subset-fonts
- aspire deploy -e Production
bump:patch: dotnet run --file ./.scripts/Bump.cs -- patch
bump:minor: dotnet run --file ./.scripts/Bump.cs -- minor
bump:major: dotnet run --file ./.scripts/Bump.cs -- major
ngrok: ngrok http https://localhost:5001
aspire-update: aspire update --self --channel stable && aspire update