-
Notifications
You must be signed in to change notification settings - Fork 28
/
hemtt.toml
71 lines (62 loc) · 1.82 KB
/
hemtt.toml
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
name = "potato"
prefix = "potato"
author = "Potato Mashers"
files = [
"mod.cpp",
"README.md",
"LICENSE.md",
"potato_icon_ca.paa"
]
version = "0.0.0"
modname = "{{name}}"
key_name = "{{prefix}}_{{version}}"
authority = "{{prefix}}_{{version}}-{{git \"id 8\"}}"
include = ["/", "p:/"]
prebuild = [
"!version_set", "!compile_sqf"
]
postbuild = [
"!version_unset", "!compile_sqf_cleanup"
]
releasebuild = [
"@zip potato_v{{semver.major}}.{{semver.minor}}.{{semver.patch}}"
]
[header_exts]
version = "{{git \"id 8\"}}"
[scripts.version_set]
steps_linux = [
"echo 'Setting version'",
"sed -i -r -s 's/[0-9]+\\.[0-9]+\\.[0-9]+/{{semver.major}}.{{semver.minor}}.{{semver.patch}}/g' mod.cpp"
]
steps_windows = [
"echo 'Setting version'",
"powershell -Command foreach ($f in 'mod.cpp') {(Get-Content $f) -replace '[0-9]+\\.[0-9]+\\.[0-9]+', '{{semver.major}}.{{semver.minor}}.{{semver.patch}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}"
]
only_release = true
show_output = true
[scripts.version_unset]
steps_linux = [
"echo 'Unsetting version'",
"sed -i -r -s 's/{{semver.major}}.{{semver.minor}}.{{semver.patch}}/0.0.0/g' mod.cpp",
]
steps_windows = [
"echo 'Unsetting version'",
"powershell -Command foreach ($f in 'mod.cpp') {(Get-Content $f) -replace '{{semver.major}}.{{semver.minor}}.{{semver.patch}}', '0.0.0' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}"
]
only_release = true
show_output = true
# SQF Compilation
[scripts.compile_sqf]
steps_windows = [
"echo Compile SQF",
"python tools/compile_sqf.py cleanup build"
]
only_release = true
show_output = true
[scripts.compile_sqf_cleanup]
steps_windows = [
"echo Compile SQF Cleanup",
"python tools/compile_sqf.py cleanup"
]
only_release = true
show_output = true