forked from nk3nny/LambsDanger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhemtt.toml
75 lines (67 loc) · 3.51 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
72
73
74
75
name = "LAMBS Danger"
prefix = "lambs"
author = "LAMBS Dev Team"
sig_version = 3
version = "2.5.2"
reuse_private_key = false
files = [
"mod.cpp",
"*.paa",
"LICENSE",
"readme.txt",
"readme.md"
]
include = ["./include"]
key_name = "{{prefix}}_danger_{{version}}"
authority = "{{prefix}}_danger_{{version}}-{{git \"id 8\"}}"
check = [
"!version_set"
]
postbuild = [
"!version_unset"
]
releasebuild = [
"!version_set_release",
"@zip @LambsDanger_{{semver.major}}_{{semver.minor}}_{{semver.patch}}"
]
[header_exts]
version = "{{version}}_{{git \"id 8\"}}"
[scripts.version_set]
steps_linux = [
"echo 'Setting version'",
"sed -i -r -s 's/#define MAJOR 0/#define MAJOR {{semver.major}}/g' addons/main/script_version.hpp",
"sed -i -r -s 's/#define MINOR 0/#define MINOR {{semver.minor}}/g' addons/main/script_version.hpp",
"sed -i -r -s 's/#define PATCHLVL 0/#define PATCHLVL {{semver.patch}}/g' addons/main/script_version.hpp",
]
steps_windows = [
"echo 'Setting version'",
"powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define MAJOR 0', '#define MAJOR {{semver.major}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define MINOR 0', '#define MINOR {{semver.minor}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define PATCHLVL 0', '#define PATCHLVL {{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/#define MAJOR {{semver.major}}/#define MAJOR 0/g' addons/main/script_version.hpp",
"sed -i -r -s 's/#define MINOR {{semver.minor}}/#define MINOR 0/g' addons/main/script_version.hpp",
"sed -i -r -s 's/#define PATCHLVL {{semver.patch}}/#define PATCHLVL 0/g' addons/main/script_version.hpp",
]
steps_windows = [
"echo 'Unsetting version'",
"powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define MAJOR {{semver.major}}', '#define MAJOR 0' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define MINOR {{semver.minor}}', '#define MINOR 0' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
"powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define PATCHLVL {{semver.patch}}', '#define PATCHLVL 0' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
]
only_release = true
show_output = true
[scripts.version_set_release]
steps_linux = [
"sed -i -r -s 's/\\{version\\}/{{semver.major}}.{{semver.minor}}.{{semver.patch}}/g' releases/{{semver.major}}.{{semver.minor}}.{{semver.patch}}/@lambs/mod.cpp",
]
steps_windows = [
"powershell -Command foreach ($f in 'releases/{{semver.major}}.{{semver.minor}}.{{semver.patch}}/@lambs/mod.cpp') {(Get-Content $f) -replace '{version}', '{{semver.major}}.{{semver.minor}}.{{semver.patch}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
]
only_release = true
show_output = true