Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b50a6a2f95 | |||
| 4646b51459 | |||
| a72b7bc1e1 | |||
| 7aca648396 |
@@ -91,6 +91,12 @@ Current behavior:
|
|||||||
|
|
||||||
Do not manually hardcode release versions in the committed `meta.lsx` for each release if CI can derive them from tags.
|
Do not manually hardcode release versions in the committed `meta.lsx` for each release if CI can derive them from tags.
|
||||||
|
|
||||||
|
Release preparation rule:
|
||||||
|
|
||||||
|
- before creating a release tag, run `scripts/set-version.ps1 -VersionTag <tag>` to update repository `Mods/DnD 5.5e AIO Russian/meta.lsx`
|
||||||
|
- only after that commit the change and create/push the release tag
|
||||||
|
- if `meta.lsx` version was changed manually (for example via BG3 Toolkit), publish using a tag that matches that exact version and do not use a different tag
|
||||||
|
|
||||||
## info.json Expectations
|
## info.json Expectations
|
||||||
|
|
||||||
`info.json` is generated during build and should remain aligned with BG3/BG3ModManager expectations.
|
`info.json` is generated during build and should remain aligned with BG3/BG3ModManager expectations.
|
||||||
@@ -137,6 +143,8 @@ User preference:
|
|||||||
- commit messages should describe what was done, not what should be done
|
- commit messages should describe what was done, not what should be done
|
||||||
- if changes affect files that go into the final `.pak`, or change the build/release process, propose releasing the next version
|
- if changes affect files that go into the final `.pak`, or change the build/release process, propose releasing the next version
|
||||||
- if push fails, retry up to two more times with a 3-second pause between attempts
|
- if push fails, retry up to two more times with a 3-second pause between attempts
|
||||||
|
- when referring to a released version in user-facing messages, format the version as a direct link to the release archive whenever the archive URL can be derived
|
||||||
|
- it is acceptable to provide that archive link immediately after publishing the tag, even if the build is still running and the link may become valid a bit later
|
||||||
|
|
||||||
Do not auto-commit or auto-push without explicit user approval.
|
Do not auto-commit or auto-push without explicit user approval.
|
||||||
|
|
||||||
|
|||||||
@@ -1,44 +1,77 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<save>
|
<save>
|
||||||
<version major="4" minor="8" revision="0" build="500"/>
|
<version major="4" minor="8" revision="0" build="500"/>
|
||||||
<region id="Config">
|
<region id="Config">
|
||||||
<node id="root">
|
<node id="root">
|
||||||
<children>
|
<children>
|
||||||
<node id="Dependencies">
|
<node id="Conflicts"/>
|
||||||
<children>
|
<node id="Dependencies">
|
||||||
<node id="ModuleShortDesc">
|
<children>
|
||||||
<attribute id="Folder" type="LSString" value=""/>
|
<node id="ModuleShortDesc">
|
||||||
<attribute id="MD5" type="LSString" value=""/>
|
<attribute id="Folder" type="LSString" value="DnD2024_897914ef-5c96-053c-44af-0be823f895fe"/>
|
||||||
<attribute id="Name" type="LSString" value="DnD 5.5e All-in-One BEYOND"/>
|
<attribute id="MD5" type="LSString" value="4bd42ca93f895d1ec521a286bea09ef2"/>
|
||||||
<attribute id="PublishHandle" type="uint64" value="0"/>
|
<attribute id="Name" type="LSString" value="DnD 5.5e All-in-One BEYOND"/>
|
||||||
<attribute id="UUID" type="guid" value="897914ef-5c96-053c-44af-0be823f895fe"/>
|
<attribute id="PublishHandle" type="uint64" value="4419649"/>
|
||||||
<attribute id="Version64" type="int64" value="36028797018963968"/>
|
<attribute id="UUID" type="guid" value="897914ef-5c96-053c-44af-0be823f895fe"/>
|
||||||
</node>
|
<attribute id="Version64" type="int64" value="144396675937468416"/>
|
||||||
</children>
|
</node>
|
||||||
|
</children>
|
||||||
|
</node>
|
||||||
|
<node id="ModuleInfo">
|
||||||
|
<attribute id="Author" type="LSString" value="MikhailRaw"/>
|
||||||
|
<attribute id="CharacterCreationLevelName" type="FixedString" value=""/>
|
||||||
|
<attribute id="Description" type="LSString" value="Русская AI локализация мода DnD 5.5e All-in-One BEYOND."/>
|
||||||
|
<attribute id="FileSize" type="uint64" value="0"/>
|
||||||
|
<attribute id="Folder" type="LSString" value="DnD 5.5e AIO Russian"/>
|
||||||
|
<attribute id="LobbyLevelName" type="FixedString" value=""/>
|
||||||
|
<attribute id="MD5" type="LSString" value="c0a8f3412870277331306e0719fc6f77"/>
|
||||||
|
<attribute id="MenuLevelName" type="FixedString" value=""/>
|
||||||
|
<attribute id="Name" type="LSString" value="DnD 5.5e All-in-One BEYOND Russian Localization"/>
|
||||||
|
<attribute id="NumPlayers" type="uint8" value="4"/>
|
||||||
|
<attribute id="PhotoBooth" type="FixedString" value=""/>
|
||||||
|
<attribute id="PublishHandle" type="uint64" value="5965149"/>
|
||||||
|
<attribute id="StartupLevelName" type="FixedString" value=""/>
|
||||||
|
<attribute id="UUID" type="FixedString" value="6401e84d-daf2-416d-adeb-99c03a2487a6"/>
|
||||||
|
<attribute id="Version64" type="int64" value="281477124194306"/>
|
||||||
|
<children>
|
||||||
|
<node id="PublishVersion">
|
||||||
|
<attribute id="Version64" type="int64" value="281477124194304"/>
|
||||||
|
</node>
|
||||||
|
<node id="Scripts">
|
||||||
|
<children>
|
||||||
|
<node id="Script">
|
||||||
|
<attribute id="UUID" type="FixedString" value="1953f77d-a201-45d7-a194-9b84c34b8461"/>
|
||||||
|
<children>
|
||||||
|
<node id="Parameters">
|
||||||
|
<children>
|
||||||
|
<node id="Parameter">
|
||||||
|
<attribute id="MapKey" type="FixedString" value="HardcoreOnly"/>
|
||||||
|
<attribute id="Type" type="int32" value="1"/>
|
||||||
|
<attribute id="Value" type="LSString" value="0"/>
|
||||||
|
</node>
|
||||||
|
</children>
|
||||||
|
</node>
|
||||||
|
</children>
|
||||||
|
</node>
|
||||||
|
<node id="Script">
|
||||||
|
<attribute id="UUID" type="FixedString" value="0d6510f5-50a3-4ecd-83d8-134c9a640324"/>
|
||||||
|
<children>
|
||||||
|
<node id="Parameters">
|
||||||
|
<children>
|
||||||
|
<node id="Parameter">
|
||||||
|
<attribute id="MapKey" type="FixedString" value="HardcoreOnly"/>
|
||||||
|
<attribute id="Type" type="int32" value="1"/>
|
||||||
|
<attribute id="Value" type="LSString" value="0"/>
|
||||||
|
</node>
|
||||||
|
</children>
|
||||||
|
</node>
|
||||||
|
</children>
|
||||||
|
</node>
|
||||||
|
</children>
|
||||||
|
</node>
|
||||||
|
</children>
|
||||||
|
</node>
|
||||||
|
</children>
|
||||||
</node>
|
</node>
|
||||||
<node id="ModuleInfo">
|
</region>
|
||||||
<attribute id="Author" type="LSString" value="MikhailRaw"/>
|
|
||||||
<attribute id="CharacterCreationLevelName" type="FixedString" value=""/>
|
|
||||||
<attribute id="Description" type="LSString" value="Русская локализация мода, который добавляет и обновляет контент в соответствии с правилами DnD 5.5e и другими источниками, включая предыстории, классы, таланты, расы, заклинания и многое другое. Это отдельный мод локализации и он требует установленный оригинальный мод."/>
|
|
||||||
<attribute id="FileSize" type="uint64" value="0"/>
|
|
||||||
<attribute id="Folder" type="LSString" value="DnD 5.5e AIO Russian"/>
|
|
||||||
<attribute id="LobbyLevelName" type="FixedString" value=""/>
|
|
||||||
<attribute id="MD5" type="LSString" value=""/>
|
|
||||||
<attribute id="MenuLevelName" type="FixedString" value=""/>
|
|
||||||
<attribute id="Name" type="LSString" value="DnD 5.5e All-in-One BEYOND Russian Localization"/>
|
|
||||||
<attribute id="NumPlayers" type="uint8" value="4"/>
|
|
||||||
<attribute id="PhotoBooth" type="FixedString" value=""/>
|
|
||||||
<attribute id="PublishHandle" type="uint64" value="0"/>
|
|
||||||
<attribute id="StartupLevelName" type="FixedString" value=""/>
|
|
||||||
<attribute id="UUID" type="FixedString" value="6401e84d-daf2-416d-adeb-99c03a2487a6"/>
|
|
||||||
<attribute id="Version64" type="int64" value="36028797018963968"/>
|
|
||||||
<children>
|
|
||||||
<node id="PublishVersion">
|
|
||||||
<attribute id="Version64" type="int64" value="36028797018963968"/>
|
|
||||||
</node>
|
|
||||||
</children>
|
|
||||||
</node>
|
|
||||||
</children>
|
|
||||||
</node>
|
|
||||||
</region>
|
|
||||||
</save>
|
</save>
|
||||||
|
|||||||
49
scripts/set-version.ps1
Normal file
49
scripts/set-version.ps1
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
param(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$VersionTag,
|
||||||
|
[string]$MetaPath = "Mods/DnD 5.5e AIO Russian/meta.lsx"
|
||||||
|
)
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
function Convert-VersionTagToVersion64 {
|
||||||
|
param(
|
||||||
|
[string]$Tag
|
||||||
|
)
|
||||||
|
|
||||||
|
$normalized = $Tag
|
||||||
|
if ($normalized.StartsWith("v")) {
|
||||||
|
$normalized = $normalized.Substring(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($normalized -notmatch '^\d+(\.\d+){0,3}$') {
|
||||||
|
throw "Version tag '$Tag' is invalid. Expected format: vX.Y.Z or X.Y.Z"
|
||||||
|
}
|
||||||
|
|
||||||
|
$parts = $normalized.Split(".")
|
||||||
|
$numbers = @(0, 0, 0, 0)
|
||||||
|
for ($i = 0; $i -lt $parts.Length; $i++) {
|
||||||
|
$numbers[$i] = [int]$parts[$i]
|
||||||
|
}
|
||||||
|
|
||||||
|
return ([int64]$numbers[0] -shl 55) -bor ([int64]$numbers[1] -shl 47) -bor ([int64]$numbers[2] -shl 31) -bor [int64]$numbers[3]
|
||||||
|
}
|
||||||
|
|
||||||
|
$resolvedMetaPath = [System.IO.Path]::GetFullPath($MetaPath)
|
||||||
|
if (-not (Test-Path -LiteralPath $resolvedMetaPath)) {
|
||||||
|
throw "meta.lsx was not found: '$resolvedMetaPath'."
|
||||||
|
}
|
||||||
|
|
||||||
|
$resolvedVersion64 = Convert-VersionTagToVersion64 -Tag $VersionTag
|
||||||
|
$metaContent = Get-Content -LiteralPath $resolvedMetaPath -Raw
|
||||||
|
|
||||||
|
$versionPattern = '(<attribute id="Version64" type="int64" value=")\d+("/>)'
|
||||||
|
if ($metaContent -notmatch $versionPattern) {
|
||||||
|
throw "Version64 attributes were not found in '$resolvedMetaPath'."
|
||||||
|
}
|
||||||
|
$updatedMeta = $metaContent -replace $versionPattern, "`${1}$resolvedVersion64`${2}"
|
||||||
|
|
||||||
|
$utf8Bom = New-Object System.Text.UTF8Encoding($true)
|
||||||
|
[System.IO.File]::WriteAllText($resolvedMetaPath, $updatedMeta, $utf8Bom)
|
||||||
|
|
||||||
|
Write-Host "[set-version.ps1] Updated '$resolvedMetaPath' to Version64=$resolvedVersion64 (from tag '$VersionTag')."
|
||||||
Reference in New Issue
Block a user