Skip to content

Commit fe1533a

Browse files
committed
Make 'dotnet pack' work
1 parent a6f4cd6 commit fe1533a

File tree

6 files changed

+33
-147
lines changed

6 files changed

+33
-147
lines changed

LibGit2Sharp.sln

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGit2Sharp", "LibGit2Shar
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGit2Sharp.Tests", "LibGit2Sharp.Tests\LibGit2Sharp.Tests.csproj", "{286E63EB-04DD-4ADE-88D6-041B57800761}"
99
EndProject
10-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{19D079A4-A273-4630-B2D2-79EADE3E7CA1}"
11-
ProjectSection(SolutionItems) = preProject
12-
.nuget\packages.config = .nuget\packages.config
13-
EndProjectSection
14-
EndProject
15-
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "LibGit2Sharp.Shared", "LibGit2Sharp.Shared\LibGit2Sharp.Shared.shproj", "{DE74D271-F14A-4D22-A738-1CAB045ECC79}"
16-
EndProject
17-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGit2Sharp.Portable", "LibGit2Sharp.Portable\LibGit2Sharp.Portable.csproj", "{39FDD325-625A-4619-A8A9-4E061D0F993F}"
18-
EndProject
19-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "InteropGeneration", "InteropGeneration", "{5BDCC83F-0B36-47C2-B5E3-A5B09BD47DA0}"
20-
EndProject
21-
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "CodeGenerationAttributes.Shared", "CodeGenerationAttributes.Shared\CodeGenerationAttributes.Shared.shproj", "{B1273734-6E0A-4097-B1CB-6925013DC809}"
22-
EndProject
23-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeGenerationAttributes.Net40", "CodeGenerationAttributes.Net40\CodeGenerationAttributes.Net40.csproj", "{F8F482FC-1B76-46F5-B1D8-3DDBBD18D1E4}"
24-
EndProject
25-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeGenerationAttributes.Portable", "CodeGenerationAttributes.Portable\CodeGenerationAttributes.Portable.csproj", "{E1A8B99F-B2F6-4A38-9DF6-8792056D70FF}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeGenerationAttributes", "CodeGenerationAttributes\CodeGenerationAttributes.csproj", "{E1A8B99F-B2F6-4A38-9DF6-8792056D70FF}"
2611
EndProject
2712
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeGeneration", "CodeGeneration\CodeGeneration.csproj", "{6598997B-9419-4CC1-84FF-9621B555E9C0}"
2813
EndProject
@@ -36,10 +21,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
3621
EndProject
3722
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeGeneration.Debugging", "CodeGeneration.Debugging\CodeGeneration.Debugging.csproj", "{C9212ECC-76F0-4658-9C89-DD506EE788B5}"
3823
EndProject
39-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGit2Sharp.Tests.Portable", "LibGit2Sharp.Tests.Portable\LibGit2Sharp.Tests.Portable.csproj", "{B9582325-8252-4281-A071-903A356D335F}"
40-
EndProject
41-
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "LibGit2Sharp.Tests.Shared", "LibGit2Sharp.Tests.Shared\LibGit2Sharp.Tests.Shared.shproj", "{564101FC-941A-44B5-9993-FFE481A05D9F}"
42-
EndProject
4324
Global
4425
GlobalSection(SharedMSBuildProjectFiles) = preSolution
4526
LibGit2Sharp.Tests.Shared\LibGit2Sharp.Tests.Shared.projitems*{b9582325-8252-4281-a071-903a356d335f}*SharedItemsImports = 4
@@ -116,7 +97,7 @@ Global
11697
$2.inheritsScope = text/x-csharp
11798
$2.scope = text/x-csharp
11899
$0.StandardHeader = $3
119-
$3.Text =
100+
$3.Text =
120101
$3.inheritsSet = Apache2License
121102
$4.FileWidth = 120
122103
$4.RemoveTrailingWhitespace = True

LibGit2Sharp/CodeGenerator.targets

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
<Target Name="GenerateCodeFirst">
2222
<PropertyGroup>
2323
<CoreCompileDependsOn>$(CoreCompileDependsOn);GenerateNativeDllNameCs;GenerateUniqueIdentifierCs</CoreCompileDependsOn>
24-
<NativeDllNamePath>$(IntermediateOutputPath)\NativeDllName.cs</NativeDllNamePath>
25-
<UniqueIdentifierPath>$(IntermediateOutputPath)\UniqueIdentifier.cs</UniqueIdentifierPath>
24+
<PrepareResourceNamesDependsOn>GenerateCommitIdVersion;$(PrepareResourceNamesDependsOn)</PrepareResourceNamesDependsOn>
25+
<NativeDllNamePath>$(IntermediateOutputPath)NativeDllName.cs</NativeDllNamePath>
26+
<UniqueIdentifierPath>$(IntermediateOutputPath)UniqueIdentifier.cs</UniqueIdentifierPath>
27+
<CommitIdVersionPath>$(IntermediateOutputPath)libgit2sharp_hash.txt</CommitIdVersionPath>
2628
</PropertyGroup>
2729
</Target>
2830

@@ -50,4 +52,17 @@
5052
<FileWrites Include="$(UniqueIdentifierPath)" />
5153
</ItemGroup>
5254
</Target>
55+
56+
<Target Name="GenerateCommitIdVersion"
57+
DependsOnTargets="GetBuildVersion">
58+
<WriteLinesToFile File="$(CommitIdVersionPath)"
59+
Lines="$(GitCommitId)"
60+
Overwrite="true" />
61+
62+
<ItemGroup>
63+
<EmbeddedResource Include="$(CommitIdVersionPath)">
64+
<LogicalName>$(RootNamespace).libgit2sharp_hash.txt</LogicalName>
65+
</EmbeddedResource>
66+
</ItemGroup>
67+
</Target>
5368
</Project>

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<GenerateDocumentationFile>true</GenerateDocumentationFile>
55
<Description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .Net and Mono.</Description>
66
<Company>LibGit2Sharp contributors</Company>
7+
<PackageTags>libgit2 git wrapper bindings API dvcs vcs</PackageTags>
8+
<PackageProjectUrl>https://github.com/libgit2/libgit2sharp/</PackageProjectUrl>
9+
<Authors>LibGit2Sharp contributors</Authors>
710

811
<SignAssembly>true</SignAssembly>
912
<AssemblyOriginatorKeyFile>..\libgit2sharp.snk</AssemblyOriginatorKeyFile>
@@ -16,13 +19,14 @@
1619
<Generator>TextTemplatingFileGenerator</Generator>
1720
<LastGenOutput>Objects.cs</LastGenOutput>
1821
</None>
22+
<None Include="..\README.md" Pack="true" PackagePath="App_Readme\" />
23+
<None Include="..\LICENSE.md" Pack="true" PackagePath="App_Readme\" />
24+
<None Include="..\CHANGES.md" Pack="true" PackagePath="App_Readme\" />
25+
1926
<Compile Update="Core\Handles\Objects.cs">
2027
<DependentUpon>Objects.tt</DependentUpon>
2128
</Compile>
2229
</ItemGroup>
23-
<ItemGroup>
24-
<EmbeddedResource Include="libgit2sharp_hash.txt" />
25-
</ItemGroup>
2630
<ItemGroup>
2731
<ProjectReference Include="..\CodeGenerationAttributes\CodeGenerationAttributes.csproj" PrivateAssets="all" />
2832
</ItemGroup>
@@ -34,4 +38,11 @@
3438
<PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.0.1" Condition=" '$(TargetFramework)' == 'netstandard1.3' " />
3539
</ItemGroup>
3640
<Import Project="CodeGenerator.targets" />
41+
<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
42+
<PropertyGroup>
43+
<PackageIconUrl>https://github.com/libgit2/libgit2sharp/raw/$(GitCommitIdShort)/square-logo.png</PackageIconUrl>
44+
<PackageReleaseNotes>https://github.com/libgit2/libgit2sharp/blob/$(GitCommitIdShort)/CHANGES.md#libgit2sharp-changes</PackageReleaseNotes>
45+
<PackageLicenseUrl>https://github.com/libgit2/libgit2sharp/raw/$(GitCommitIdShort)/LICENSE.md</PackageLicenseUrl>
46+
</PropertyGroup>
47+
</Target>
3748
</Project>

LibGit2Sharp/libgit2sharp_hash.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

nuget.package/BuildNugetPackage.ps1

Lines changed: 0 additions & 94 deletions
This file was deleted.

nuget.package/LibGit2Sharp.nuspec

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)