-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
88 lines (85 loc) · 2.95 KB
/
Taskfile.yml
File metadata and controls
88 lines (85 loc) · 2.95 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
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: '3'
##########################################################
# Declare these values as environment variables!!! #
# - PFX: Location of PFX file for code sign #
# - PFX_PW: Password of PFX file #
##########################################################
env:
CS_CONFIGURATION: Release
CS_DIST: ../.dist
CS_DOTNET: 'C:\Program Files\dotnet\dotnet.exe'
CS_FRAMEWORK: net10.0
CS_SIGNTOOL: 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\signtool.exe'
CS_TARGET: win-x64
dotenv:
- .env.local
- .env.{{.ENV}}
- .env
tasks:
default:
cmds:
- task: build
- task: cleanup
- task: sign
build:
cmds:
- task: build:clear-temp
- task: build:hammer-launcher
- task: build:pathed
- task: build:rcalc
build:clear-temp:
dir: clear-temp
cmds:
- '"$CS_DOTNET" publish -c $CS_CONFIGURATION -r $CS_TARGET'
- 'mkdir "$CS_DIST" 2> /dev/null'
- 'mv bin/$CS_CONFIGURATION/$CS_FRAMEWORK/$CS_TARGET/publish/ClearTemp.exe "$CS_DIST"'
- 'mv bin/$CS_CONFIGURATION/$CS_FRAMEWORK/$CS_TARGET/publish/ClearTemp.txt "$CS_DIST"'
build:hammer-launcher:
dir: hammer-launcher
env:
CS_FRAMEWORK: net10.0-windows
cmds:
- '"$CS_DOTNET" publish -c $CS_CONFIGURATION -r $CS_TARGET'
- 'mkdir "$CS_DIST" 2> /dev/null'
- 'mv bin/$CS_CONFIGURATION/$CS_FRAMEWORK/$CS_TARGET/publish/HammerLauncher.exe "$CS_DIST"'
build:pathed:
dir: pathed
env:
CS_FRAMEWORK: net10.0-windows
cmds:
- '"$CS_DOTNET" publish -c $CS_CONFIGURATION -r $CS_TARGET'
- 'mkdir "$CS_DIST" 2> /dev/null'
- 'mv bin/$CS_CONFIGURATION/$CS_FRAMEWORK/$CS_TARGET/publish/Pathed.exe "$CS_DIST"'
build:rcalc:
dir: rcalc
env:
CS_FRAMEWORK: net10.0-windows
cmds:
- '"$CS_DOTNET" publish -c $CS_CONFIGURATION -r $CS_TARGET'
- 'mkdir "$CS_DIST" 2> /dev/null'
- 'mv bin/$CS_CONFIGURATION/$CS_FRAMEWORK/$CS_TARGET/publish/rcalc.exe "$CS_DIST"'
cleanup:
ignore_error: true
cmds:
- taskkill /f /im MSBuild.exe
- taskkill /f /im VBCSCompiler.exe
- taskkill /f /im dotnet.exe
sign:
cmds:
- task: sign:clear-temp
- task: sign:hammer-launcher
- task: sign:pathed
- task: sign:rcalc
sign:clear-temp:
cmds:
- '"$CS_SIGNTOOL" sign /f "$PFX" /p "$PFX_PW" /fd SHA256 /td SHA256 /tr http://timestamp.digicert.com .dist/ClearTemp.exe'
sign:hammer-launcher:
cmds:
- '"$CS_SIGNTOOL" sign /f "$PFX" /p "$PFX_PW" /fd SHA256 /td SHA256 /tr http://timestamp.digicert.com .dist/HammerLauncher.exe'
sign:pathed:
cmds:
- '"$CS_SIGNTOOL" sign /f "$PFX" /p "$PFX_PW" /fd SHA256 /td SHA256 /tr http://timestamp.digicert.com .dist/Pathed.exe'
sign:rcalc:
cmds:
- '"$CS_SIGNTOOL" sign /f "$PFX" /p "$PFX_PW" /fd SHA256 /td SHA256 /tr http://timestamp.digicert.com .dist/rcalc.exe'