Skip to content

Commit 799e9db

Browse files
StevenTCramerclaude
andcommitted
Replace custom build metadata with TimeWarp.Build.Tasks package
- Add TimeWarp.Build.Tasks package for automated git commit metadata injection - Remove custom SetAssemblyMetaData target and convert-timestamp dependency - Remove Microsoft.SourceLink.GitHub package (functionality included in Build.Tasks) - Remove CI build configuration (handled by Build.Tasks) - Update all package readme references from read-me.md to readme.md - Add .agent/workspace/ to .gitignore This simplifies the build configuration by delegating git metadata handling to a dedicated package, eliminating custom MSBuild targets and external tools. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 752d8de commit 799e9db

7 files changed

Lines changed: 12 additions & 37 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,3 +322,4 @@ __pycache__/
322322
/.aider.tags.cache.v3/cache.db-shm
323323
/.aider.tags.cache.v3/cache.db-wal
324324
/.aider.input.history
325+
.agent/workspace/

Directory.Build.props

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
<LocalNuGetCache>$(RepositoryRoot)local-nuget-feed/</LocalNuGetCache>
1515
</PropertyGroup>
1616

17-
<!-- Deterministic Builds https://devblogs.microsoft.com/dotnet/producing-packages-with-source-link/#deterministic-builds -->
18-
<PropertyGroup Label="Continuous Integration" Condition="'$(GITHUB_ACTIONS)' == 'true'">
19-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
20-
</PropertyGroup>
21-
2217
<!-- Default language and framework settings for all projects -->
2318
<PropertyGroup Label="Project Defaults">
2419
<TargetFramework>net9.0</TargetFramework>
@@ -45,30 +40,9 @@
4540
<PackageReference Include="TimeWarp.SourceGenerators" PrivateAssets="all" />
4641
</ItemGroup>
4742

48-
<!-- This is to add the CommitDate and CommitHash to your assemblyinfo -->
49-
<Target Name="SetAssemblyMetaData" BeforeTargets="PreBuildEvent" >
50-
<Exec Command="git log -1 --format=%%ct" ConsoleToMSBuild="true" Condition="'$(OS)' == 'Windows_NT'">
51-
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitTimestamp"/>
52-
</Exec>
53-
<Exec Command="git log -1 --format=%ct" ConsoleToMSBuild="true" Condition="'$(OS)' != 'Windows_NT'">
54-
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitTimestamp"/>
55-
</Exec>
56-
<Exec Command="convert-timestamp --GitCommitTimestamp $(GitCommitTimestamp)" ConsoleToMSBuild="true">
57-
<Output TaskParameter="ConsoleOutput" PropertyName="CommitDate"/>
58-
</Exec>
59-
<PropertyGroup>
60-
<!-- In Visual Studio the below line crashes if they fix VS then we can use this and no need for the powershell script -->
61-
<!--<LastCommitDate>$([System.DateTime]::UnixEpoch.AddSeconds($(GitCommitTimestamp)).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssK"))</LastCommitDate>-->
62-
<LastCommitDate>$(CommitDate)</LastCommitDate>
63-
</PropertyGroup>
64-
<ItemGroup>
65-
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
66-
<_Parameter1>CommitDate</_Parameter1>
67-
<_Parameter2>$(LastCommitDate)</_Parameter2>
68-
</AssemblyAttribute>
69-
</ItemGroup>
70-
<!-- <Message Importance="high" Text="OS: $(OS)" />-->
71-
<!-- <Message Importance="high" Text="CommitDate: $(LastCommitDate)" />-->
72-
</Target>
43+
<!-- TimeWarp Build Tasks - Automatically injects git commit metadata into assemblies -->
44+
<ItemGroup Label="Build Tools">
45+
<PackageReference Include="TimeWarp.Build.Tasks" PrivateAssets="all" />
46+
</ItemGroup>
7347

7448
</Project>

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<ItemGroup>
66
<!-- TimeWarp Packages -->
77
<PackageVersion Include="TimeWarp.Amuru" Version="1.0.0-beta.5" />
8+
<PackageVersion Include="TimeWarp.Build.Tasks" Version="1.0.0" />
89
<PackageVersion Include="TimeWarp.Fixie" Version="3.1.0" />
910
<PackageVersion Include="TimeWarp.Mediator" Version="13.0.0" />
1011
<PackageVersion Include="TimeWarp.Nuru" Version="2.1.0-beta.8" />
@@ -48,7 +49,6 @@
4849
<PackageVersion Include="Microsoft.Playwright" Version="1.19.1" />
4950
<PackageVersion Include="Microsoft.Playwright.MSTest" Version="1.55.0" />
5051
<PackageVersion Include="Microsoft.Playwright.NUnit" Version="1.44.0" />
51-
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
5252
<PackageVersion Include="Microsoft.TypeScript.MSBuild" Version="5.9.3" />
5353

5454
<!-- Testing Frameworks -->

source/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<RepositoryType>git</RepositoryType>
1515
<PackageLicenseExpression>Unlicense</PackageLicenseExpression>
1616
<PackageReleaseNotes>https://timewarpengineering.github.io/timewarp-state/Overview.html</PackageReleaseNotes>
17-
<PackageReadmeFile>read-me.md</PackageReadmeFile>
17+
<PackageReadmeFile>readme.md</PackageReadmeFile>
1818
<ContentTargetFolders>contentFiles</ContentTargetFolders>
1919
<PackageOutputPath>$(LocalNuGetFeed)</PackageOutputPath>
2020
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

source/timewarp-state-plus/timewarp-state-plus.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<None Include=".\read-me.md">
30+
<None Include=".\readme.md">
3131
<Pack>True</Pack>
3232
<PackagePath>\</PackagePath>
3333
</None>

source/timewarp-state-policies/timewarp-state-policies.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageId>TimeWarp.State.Policies</PackageId>
1414
<AssemblyName>TimeWarp.State.Policies</AssemblyName>
1515
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
16-
<PackageReadmeFile>read-me.md</PackageReadmeFile>
16+
<PackageReadmeFile>readme.md</PackageReadmeFile>
1717
<PackageReleaseNotes>https://timewarpengineering.github.io/timewarp-state/Overview.html</PackageReleaseNotes>
1818
</PropertyGroup>
1919

@@ -27,7 +27,7 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<None Include=".\read-me.md">
30+
<None Include=".\readme.md">
3131
<Pack>True</Pack>
3232
<PackagePath>\</PackagePath>
3333
</None>

source/timewarp-state/timewarp-state.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<PropertyGroup>
2424
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput)</TargetsForTfmSpecificBuildOutput>
25-
<PackageReadmeFile>read-me.md</PackageReadmeFile>
25+
<PackageReadmeFile>readme.md</PackageReadmeFile>
2626
<PackageReleaseNotes>https://timewarpengineering.github.io/timewarp-state/Overview.html</PackageReleaseNotes>
2727
</PropertyGroup>
2828

@@ -64,7 +64,7 @@
6464

6565
<ItemGroup>
6666
<None Include="$(RepositoryRoot)assets\logo.png" Pack="true" PackagePath=""/>
67-
<None Include="$(RepositoryRoot)read-me.md" Pack="true" PackagePath=""/>
67+
<None Include="$(RepositoryRoot)readme.md" Pack="true" PackagePath=""/>
6868
</ItemGroup>
6969

7070
<ItemGroup>

0 commit comments

Comments
 (0)