-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhemtt.toml
More file actions
52 lines (47 loc) · 2.18 KB
/
Copy pathhemtt.toml
File metadata and controls
52 lines (47 loc) · 2.18 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
name = "igt_gme"
prefix = "gme"
author = "GME Team"
files = [
"mod.cpp",
"README.md",
"LICENSE",
"logo_gme_ca.paa"
]
modname = "{{name}}"
key_name = "{{prefix}}_{{version}}"
authority = "{{prefix}}_{{version}}-{{git \"id 8\"}}"
check = [
"!version_set"
]
releasebuild = [
"@zip igt_gme_{{semver.major}}.{{semver.minor}}.{{semver.patch}}",
"!version_unset"
]
[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 README.md addons/main/CfgMods.hpp",
"sed -i -r -s 's/#define BUILD 000000/#define BUILD {{date \"%y%m%d\"}}/g' addons/main/script_version.hpp"
]
steps_windows = [
"echo Setting version",
"powershell -Command foreach ($f in 'mod.cpp', 'README.md', 'addons/main/CfgMods.hpp') {(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}",
"powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define BUILD 000000', '#define BUILD {{date \"%y%m%d\"}}' -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 addons/main/CfgMods.hpp",
"sed -i -r -s 's/#define BUILD {{date \"%y%m%d\"}}/#define BUILD 000000/g' addons/main/script_version.hpp",
]
steps_windows = [
"echo Unsetting version",
"powershell -Command foreach ($f in 'mod.cpp', 'addons/main/CfgMods.hpp') {(Get-Content $f) -replace '{{semver.major}}.{{semver.minor}}.{{semver.patch}}', '0.0.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 BUILD {{date \"%y%m%d\"}}', '#define BUILD 000000' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}",
]
only_release = true
show_output = true