mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-03-28 18:27:23 +08:00
build: auto-sync manifest.json version_number from csproj Version during ZipMod
This commit is contained in:
@@ -60,6 +60,10 @@
|
||||
<_ZipPath>$(_PackageDir)\$(ProjectName)-$(Version).zip</_ZipPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Sync manifest.json version_number from .csproj $(Version) before packaging -->
|
||||
<Exec Condition="Exists('$(_PackageDir)\manifest.json')"
|
||||
Command="powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$f='$(_PackageDir)\manifest.json'; $c=[IO.File]::ReadAllText($f); $c=$c -replace '(\u0022version_number\u0022\s*:\s*\u0022)[^\u0022]*(\u0022)','${1}$(Version)${2}'; [IO.File]::WriteAllText($f,$c,[Text.UTF8Encoding]::new($true))"" />
|
||||
|
||||
<!-- ── plugins/patchers layout: copy DLL into package/plugins/ first ── -->
|
||||
<MakeDir Directories="$(_PackageDir)\plugins"
|
||||
Condition="'$(PackUsePluginsLayout)' == 'true'" />
|
||||
|
||||
Reference in New Issue
Block a user