-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (38 loc) · 1.57 KB
/
Copy pathMakefile
File metadata and controls
48 lines (38 loc) · 1.57 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
SOLUTION := RomForge.slnx
UI_PROJECT := src/RomForge.UI/RomForge.UI.csproj
APP_BUNDLE := artifacts/RomForge.app
DEV_BUNDLE := artifacts/RomForge-dev.app
PUBLISH_DIR := artifacts/publish/osx-arm64
BUILD_OUT := artifacts/bin/RomForge.UI/debug/net10.0
.PHONY: build test run check clean coverage package sonar sonar-start
build:
dotnet build $(SOLUTION) --verbosity quiet
test:
dotnet test $(SOLUTION) --verbosity quiet
run: build
rm -rf $(DEV_BUNDLE)
mkdir -p $(DEV_BUNDLE)/Contents/MacOS $(DEV_BUNDLE)/Contents/Resources
cp -R $(BUILD_OUT)/. $(DEV_BUNDLE)/Contents/MacOS/
cp packaging/macos/Info.plist $(DEV_BUNDLE)/Contents/
cp packaging/macos/icon.icns $(DEV_BUNDLE)/Contents/Resources/
chmod +x $(DEV_BUNDLE)/Contents/MacOS/RomForge
open $(DEV_BUNDLE)
check:
dotnet clean $(SOLUTION) --verbosity quiet
dotnet build $(SOLUTION) --verbosity quiet
dotnet test $(SOLUTION) --verbosity quiet
coverage:
dotnet test $(SOLUTION) --collect:"XPlat Code Coverage" --settings coverage.runsettings --results-directory artifacts/coverage --verbosity quiet
clean:
dotnet clean $(SOLUTION) --verbosity quiet
package:
dotnet publish $(UI_PROJECT) -c Release -r osx-arm64 --self-contained true -o $(PUBLISH_DIR)
# One-time setup:
# brew install sonar-scanner
# docker run -d --name sonarqube -p 9000:9000 sonarqube:lts-community
# Log in at http://localhost:9000 (admin / admin on first run)
# My Account → Security → Generate Token → export SONAR_TOKEN=<token>
sonar-start:
docker run -d --name sonarqube -p 9000:9000 sonarqube:lts-community
sonar: coverage
sonar-scanner