Aetheria/Directory.Build.targets
Meta Vens 97dd38dfb8 Pin CultMath 0.3.0 and make the pin guard fire on Linux
Directory.Build.props, Packages/manifest.json and the lock move to
cultmath-unity-v0.3.0 (614fd445) together. VerifyCultLibRevision matched the
CultMath ProjectReference by a backslash-spelled identity and was skipped on
Linux; it now matches by project file name. Does not pass tests: generated
content re-rolls with the new noise kernel, fixtures follow in later commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:02:36 +02:00

39 lines
2.3 KiB
XML

<Project>
<!-- One pin per CultLib package, mirroring Packages/manifest.json, which pins each Unity package at its
own tag. The headless build must compile the same revisions Unity consumes, so a package moves
here only when its manifest tag moves. -->
<ItemGroup>
<PinnedCultLib Include="CultMath"
Root="$(CultMathRoot)"
Revision="$(CultMathRevision)"
Project="packages\cultmath\src\CultMath\CultMath.csproj"
RootProperty="CultMathRoot" />
<PinnedCultLib Include="CultCache"
Root="$(CultLibRoot)"
Revision="$(CultLibRevision)"
Project="src\GameCult.Caching\GameCult.Caching.csproj"
RootProperty="CultLibRoot" />
</ItemGroup>
<Target Name="VerifyCultLibRevision"
BeforeTargets="ResolveProjectReferences"
Outputs="%(PinnedCultLib.Identity)"
Condition="'$(SkipCultLibRevisionCheck)' != 'true' and '@(ProjectReference->WithMetadataValue('Filename','CultMath'))' != ''">
<Error Condition="!Exists('%(PinnedCultLib.Root)\%(PinnedCultLib.Project)')"
Text="%(PinnedCultLib.RootProperty) '%(PinnedCultLib.Root)' does not contain %(PinnedCultLib.Project)." />
<Exec Command="&quot;$(GitExecutable)&quot; -C &quot;%(PinnedCultLib.Root)&quot; rev-parse HEAD"
ConsoleToMSBuild="true"
StandardOutputImportance="Low">
<Output TaskParameter="ConsoleOutput" PropertyName="ActualPinnedRevision" />
</Exec>
<Error Condition="'$([System.String]::Copy($(ActualPinnedRevision)).Trim())' != '%(PinnedCultLib.Revision)'"
Text="%(PinnedCultLib.Identity) must be CultLib revision %(PinnedCultLib.Revision); found $([System.String]::Copy($(ActualPinnedRevision)).Trim()). Set %(PinnedCultLib.RootProperty) to the admitted clean worktree." />
<Exec Command="&quot;$(GitExecutable)&quot; -C &quot;%(PinnedCultLib.Root)&quot; status --porcelain --untracked-files=normal"
ConsoleToMSBuild="true"
StandardOutputImportance="Low">
<Output TaskParameter="ConsoleOutput" PropertyName="PinnedStatus" />
</Exec>
<Error Condition="'$([System.String]::Copy($(PinnedStatus)).Trim())' != ''"
Text="%(PinnedCultLib.RootProperty) must be clean before Aetheria consumes it." />
</Target>
</Project>