fix: ZipMod target

This commit is contained in:
soarqin committed 2026-10-31 15:45:55 +08:00
1 parent 6263775dc1
commit d68329ff9a
2 files changed
+5 -14

No files matched your search

+5
View File
@@ -26,6 +26,11 @@
<_ZipPath>$(_PackageDir)\$(ProjectName)-$(Version).zip</_ZipPath>
</PropertyGroup>
<!-- Refresh referenced preloaders before collecting patchers; other projects skip this target. -->
<MSBuild Projects="@(ProjectReference)" Targets="CopyToParentPackage"
Properties="Configuration=$(Configuration)"
Condition="'$(PackUsePluginsLayout)' == 'true'" />
<!-- Sync manifest.json version_number from .csproj $(Version) before packaging -->
<Exec Condition="Exists('$(_PackageDir)\manifest.json')"
Command="powershell.exe -NoProfile -ExecutionPolicy Bypass -Command &quot;$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))&quot;" />