Pin CultLib 2.0.0 for builds
Directory.Build.props names CultLibRoot (CULTLIB_ROOT, else the sibling checkout) and pins CultLibRevision to cultlib-unity-v2.0.0 (42dce361). Directory.Build.targets fails the build unless that checkout is at the pin and clean, as Aetheria's guard does. Project references use CultLibRoot. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f8c0e39a03
commit
4945968e96
4 changed files with 51 additions and 1 deletions
10
Directory.Build.props
Normal file
10
Directory.Build.props
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<CultLibRoot Condition="'$(CultLibRoot)' == '' and '$(CULTLIB_ROOT)' != ''">$(CULTLIB_ROOT)</CultLibRoot>
|
||||
<CultLibRoot Condition="'$(CultLibRoot)' == ''">$(MSBuildThisFileDirectory)..\CultLib</CultLibRoot>
|
||||
<!-- CultLib 2.0.0: tag cultlib-unity-v2.0.0. -->
|
||||
<CultLibRevision>42dce3611a81adc5c5fac54cadbaa5637d6022d3</CultLibRevision>
|
||||
<GitExecutable Condition="'$(GitExecutable)' == '' and Exists('C:\Program Files\Git\cmd\git.exe')">C:\Program Files\Git\cmd\git.exe</GitExecutable>
|
||||
<GitExecutable Condition="'$(GitExecutable)' == ''">git</GitExecutable>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
30
Directory.Build.targets
Normal file
30
Directory.Build.targets
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<Project>
|
||||
<!-- Builds consume CultLib at one admitted revision. Point CultLibRoot (or CULTLIB_ROOT) at a clean
|
||||
worktree of that revision: git worktree add <path> cultlib-unity-v2.0.0 (detached) (in CultLib). -->
|
||||
<Target Name="VerifyCultLibRevision"
|
||||
BeforeTargets="ResolveProjectReferences"
|
||||
Condition="'$(SkipCultLibRevisionCheck)' != 'true'">
|
||||
<ItemGroup>
|
||||
<_CultLibReference Include="@(ProjectReference)"
|
||||
Condition="$([System.String]::Copy('%(Filename)').StartsWith('GameCult.')) or '%(Filename)' == 'CultMath'" />
|
||||
</ItemGroup>
|
||||
<Error Condition="'@(_CultLibReference)' != '' and !Exists('$(CultLibRoot)\src\GameCult.Caching\GameCult.Caching.csproj')"
|
||||
Text="CultLibRoot '$(CultLibRoot)' is not a CultLib checkout." />
|
||||
<Exec Condition="'@(_CultLibReference)' != ''"
|
||||
Command=""$(GitExecutable)" -C "$(CultLibRoot)" rev-parse HEAD"
|
||||
ConsoleToMSBuild="true"
|
||||
StandardOutputImportance="Low">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="ActualCultLibRevision" />
|
||||
</Exec>
|
||||
<Error Condition="'@(_CultLibReference)' != '' and '$([System.String]::Copy($(ActualCultLibRevision)).Trim())' != '$(CultLibRevision)'"
|
||||
Text="CultLib must be revision $(CultLibRevision) (cultlib-unity-v2.0.0); found $([System.String]::Copy($(ActualCultLibRevision)).Trim()). Set CultLibRoot to a clean worktree of that tag." />
|
||||
<Exec Condition="'@(_CultLibReference)' != ''"
|
||||
Command=""$(GitExecutable)" -C "$(CultLibRoot)" status --porcelain --untracked-files=normal"
|
||||
ConsoleToMSBuild="true"
|
||||
StandardOutputImportance="Low">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="CultLibStatus" />
|
||||
</Exec>
|
||||
<Error Condition="'@(_CultLibReference)' != '' and '$([System.String]::Copy($(CultLibStatus)).Trim())' != ''"
|
||||
Text="CultLibRoot '$(CultLibRoot)' must be clean before this repo consumes it." />
|
||||
</Target>
|
||||
</Project>
|
||||
11
README.md
11
README.md
|
|
@ -135,3 +135,14 @@ and contact facts come from Box3D through an explicitly owned Ymir session.
|
|||
Manual Unity callbacks and Aetheria geometry tests must be structurally unable
|
||||
to decide the result. Snapshot compatibility calls may use isolated sessions;
|
||||
they are not allowed to infer or share retained-world identity.
|
||||
|
||||
## Building against CultLib
|
||||
|
||||
Builds are pinned to CultLib 2.0.0 (tag `cultlib-unity-v2.0.0`, revision `42dce3611a81adc5c5fac54cadbaa5637d6022d3`); the build fails if the CultLib checkout differs or is dirty. Create a pinned worktree and point the build at it:
|
||||
|
||||
```powershell
|
||||
git -C <CultLib> worktree add --detach <path> cultlib-unity-v2.0.0
|
||||
dotnet build -p:CultLibRoot=<path> # or set CULTLIB_ROOT=<path>
|
||||
```
|
||||
|
||||
Without an override the sibling `..\CultLib` checkout is used and must itself be at that tag.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<CultLibRoot Condition="'$(CultLibRoot)' == ''">$(MSBuildThisFileDirectory)..\..\..\CultLib</CultLibRoot>
|
||||
<EveRoot Condition="'$(EveRoot)' == ''">$(MSBuildThisFileDirectory)..\..\..\Eve</EveRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue