Skip to content

Commit 4cf3d04

Browse files
authored
Merge pull request #95 from libgit2/improve-props-files
Improve props files
2 parents d7063ac + 2071dba commit 4cf3d04

File tree

5 files changed

+9
-112
lines changed

5 files changed

+9
-112
lines changed

UpdateLibgit2ToSha.ps1

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ Push-Location $libgit2Directory
9393
$buildProperties = @"
9494
<Project>
9595
<PropertyGroup>
96-
<MSBuildAllProjects>`$(MSBuildAllProjects);`$(MSBuildThisFileFullPath)</MSBuildAllProjects>
9796
<libgit2_propsfile>`$(MSBuildThisFileFullPath)</libgit2_propsfile>
9897
<libgit2_hash>$sha</libgit2_hash>
9998
<libgit2_filename>$binaryFilename</libgit2_filename>
@@ -106,64 +105,15 @@ Push-Location $libgit2Directory
106105
$net46BuildProperties = @"
107106
<Project>
108107
<PropertyGroup>
109-
<MSBuildAllProjects>`$(MSBuildAllProjects);`$(MSBuildThisFileFullPath)</MSBuildAllProjects>
110108
<libgit2_propsfile>`$(MSBuildThisFileFullPath)</libgit2_propsfile>
111109
<libgit2_hash>$sha</libgit2_hash>
112110
<libgit2_filename>$binaryFilename</libgit2_filename>
113111
</PropertyGroup>
114112
<ItemGroup>
115-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\$binaryFilename.dll')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\$binaryFilename.dll">
116-
<TargetPath>lib\win32\x64\$binaryFilename.dll</TargetPath>
117-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
118-
</ContentWithTargetPath>
119-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\$binaryFilename.pdb')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\$binaryFilename.pdb">
120-
<TargetPath>lib\win32\x64\$binaryFilename.pdb</TargetPath>
121-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
122-
</ContentWithTargetPath>
123-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\$binaryFilename.dll')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\$binaryFilename.dll">
124-
<TargetPath>lib\win32\x86\$binaryFilename.dll</TargetPath>
125-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
126-
</ContentWithTargetPath>
127-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\$binaryFilename.pdb')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\$binaryFilename.pdb">
128-
<TargetPath>lib\win32\x86\$binaryFilename.pdb</TargetPath>
129-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
130-
</ContentWithTargetPath>
131-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\osx\native\lib$binaryFilename.dylib')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\osx\native\lib$binaryFilename.dylib">
132-
<TargetPath>lib\osx\lib$binaryFilename.dylib</TargetPath>
133-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
134-
</ContentWithTargetPath>
135-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\linux-x64\native\lib$binaryFilename.so')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\linux-x64\native\lib$binaryFilename.so">
136-
<TargetPath>lib\linux-x64\lib$binaryFilename.so</TargetPath>
137-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
138-
</ContentWithTargetPath>
139-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\ubuntu.18.04-x64\native\lib$binaryFilename.so')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\ubuntu.18.04-x64\native\lib$binaryFilename.so">
140-
<TargetPath>lib\ubuntu.18.04-x64\lib$binaryFilename.so</TargetPath>
141-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
142-
</ContentWithTargetPath>
143-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\rhel-x64\native\lib$binaryFilename.so')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\rhel-x64\native\lib$binaryFilename.so">
144-
<TargetPath>lib\rhel-x64\lib$binaryFilename.so</TargetPath>
145-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
146-
</ContentWithTargetPath>
147-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\fedora-x64\native\lib$binaryFilename.so')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\fedora-x64\native\lib$binaryFilename.so">
148-
<TargetPath>lib\fedora-x64\lib$binaryFilename.so</TargetPath>
149-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
150-
</ContentWithTargetPath>
151-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\debian.9-x64\native\lib$binaryFilename.so')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\debian.9-x64\native\lib$binaryFilename.so">
152-
<TargetPath>lib\debian.9-x64\lib$binaryFilename.so</TargetPath>
153-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
154-
</ContentWithTargetPath>
155-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\alpine-x64\native\lib$binaryFilename.so')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\alpine-x64\native\lib$binaryFilename.so">
156-
<TargetPath>lib\alpine-x64\lib$binaryFilename.so</TargetPath>
157-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
158-
</ContentWithTargetPath>
159-
<ContentWithTargetPath Condition="Exists('`$(MSBuildThisFileDirectory)\..\..\runtimes\alpine.3.9-x64\native\lib$binaryFilename.so')" Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\alpine.3.9-x64\native\lib$binaryFilename.so">
160-
<TargetPath>lib\alpine.3.9-x64\lib$binaryFilename.so</TargetPath>
161-
CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
162-
</ContentWithTargetPath>
163-
<ContentWithTargetPath Include="`$(MSBuildThisFileDirectory)\..\..\libgit2\LibGit2Sharp.dll.config">
164-
<TargetPath>LibGit2Sharp.dll.config</TargetPath>
165-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
166-
</ContentWithTargetPath>
113+
<ContentWithTargetPath Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\*" TargetPath="lib\win32\x86\%(Filename)%(Extension)" CopyToOutputDirectory="PreserveNewest" />
114+
<ContentWithTargetPath Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\*" TargetPath="lib\win32\x64\%(Filename)%(Extension)" CopyToOutputDirectory="PreserveNewest" />
115+
<ContentWithTargetPath Include="`$(MSBuildThisFileDirectory)\..\..\runtimes\**\*`" Exclude="`$(MSBuildThisFileDirectory)\..\..\runtimes\win-*\**\*" TargetPath="lib\%(RecursiveDir)..\%(Filename)%(Extension)" CopyToOutputDirectory="PreserveNewest" />
116+
<ContentWithTargetPath Include="`$(MSBuildThisFileDirectory)\..\..\libgit2\LibGit2Sharp.dll.config" TargetPath="LibGit2Sharp.dll.config" CopyToOutputDirectory="PreserveNewest" />
167117
</ItemGroup>
168118
</Project>
169119
"@

nuget.package/build/LibGit2Sharp.NativeBinaries.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
43
<libgit2_propsfile>$(MSBuildThisFileFullPath)</libgit2_propsfile>
54
<libgit2_hash>572e4d8c1f1d42feac1c770f0cddf6fda6c4eca0</libgit2_hash>
65
<libgit2_filename>git2-572e4d8</libgit2_filename>
Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,13 @@
11
<Project>
22
<PropertyGroup>
3-
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
43
<libgit2_propsfile>$(MSBuildThisFileFullPath)</libgit2_propsfile>
54
<libgit2_hash>572e4d8c1f1d42feac1c770f0cddf6fda6c4eca0</libgit2_hash>
65
<libgit2_filename>git2-572e4d8</libgit2_filename>
76
</PropertyGroup>
87
<ItemGroup>
9-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\git2-572e4d8.dll')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\git2-572e4d8.dll">
10-
<TargetPath>lib\win32\x64\git2-572e4d8.dll</TargetPath>
11-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
12-
</ContentWithTargetPath>
13-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\git2-572e4d8.pdb')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\git2-572e4d8.pdb">
14-
<TargetPath>lib\win32\x64\git2-572e4d8.pdb</TargetPath>
15-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16-
</ContentWithTargetPath>
17-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\git2-572e4d8.dll')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\git2-572e4d8.dll">
18-
<TargetPath>lib\win32\x86\git2-572e4d8.dll</TargetPath>
19-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
20-
</ContentWithTargetPath>
21-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\git2-572e4d8.pdb')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\git2-572e4d8.pdb">
22-
<TargetPath>lib\win32\x86\git2-572e4d8.pdb</TargetPath>
23-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
24-
</ContentWithTargetPath>
25-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\osx\native\libgit2-572e4d8.dylib')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\osx\native\libgit2-572e4d8.dylib">
26-
<TargetPath>lib\osx\libgit2-572e4d8.dylib</TargetPath>
27-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
28-
</ContentWithTargetPath>
29-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\linux-x64\native\libgit2-572e4d8.so')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\linux-x64\native\libgit2-572e4d8.so">
30-
<TargetPath>lib\linux-x64\libgit2-572e4d8.so</TargetPath>
31-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
32-
</ContentWithTargetPath>
33-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\ubuntu.18.04-x64\native\libgit2-572e4d8.so')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\ubuntu.18.04-x64\native\libgit2-572e4d8.so">
34-
<TargetPath>lib\ubuntu.18.04-x64\libgit2-572e4d8.so</TargetPath>
35-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
36-
</ContentWithTargetPath>
37-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\rhel-x64\native\libgit2-572e4d8.so')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\rhel-x64\native\libgit2-572e4d8.so">
38-
<TargetPath>lib\rhel-x64\libgit2-572e4d8.so</TargetPath>
39-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
40-
</ContentWithTargetPath>
41-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\fedora-x64\native\libgit2-572e4d8.so')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\fedora-x64\native\libgit2-572e4d8.so">
42-
<TargetPath>lib\fedora-x64\libgit2-572e4d8.so</TargetPath>
43-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
44-
</ContentWithTargetPath>
45-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\debian.9-x64\native\libgit2-572e4d8.so')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\debian.9-x64\native\libgit2-572e4d8.so">
46-
<TargetPath>lib\debian.9-x64\libgit2-572e4d8.so</TargetPath>
47-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
48-
</ContentWithTargetPath>
49-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\alpine-x64\native\libgit2-572e4d8.so')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\alpine-x64\native\libgit2-572e4d8.so">
50-
<TargetPath>lib\alpine-x64\libgit2-572e4d8.so</TargetPath>
51-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
52-
</ContentWithTargetPath>
53-
<ContentWithTargetPath Condition="Exists('$(MSBuildThisFileDirectory)\..\..\runtimes\alpine.3.9-x64\native\libgit2-572e4d8.so')" Include="$(MSBuildThisFileDirectory)\..\..\runtimes\alpine.3.9-x64\native\libgit2-572e4d8.so">
54-
<TargetPath>lib\alpine.3.9-x64\libgit2-572e4d8.so</TargetPath>
55-
CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
56-
</ContentWithTargetPath>
57-
<ContentWithTargetPath Include="$(MSBuildThisFileDirectory)\..\..\libgit2\LibGit2Sharp.dll.config">
58-
<TargetPath>LibGit2Sharp.dll.config</TargetPath>
59-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
60-
</ContentWithTargetPath>
8+
<ContentWithTargetPath Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\*" TargetPath="lib\win32\x86\%(Filename)%(Extension)" CopyToOutputDirectory="PreserveNewest" />
9+
<ContentWithTargetPath Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x64\native\*" TargetPath="lib\win32\x64\%(Filename)%(Extension)" CopyToOutputDirectory="PreserveNewest" />
10+
<ContentWithTargetPath Include="$(MSBuildThisFileDirectory)\..\..\runtimes\**\*" Exclude="$(MSBuildThisFileDirectory)\..\..\runtimes\win-*\**\*" TargetPath="lib\%(RecursiveDir)..\%(Filename)%(Extension)" CopyToOutputDirectory="PreserveNewest" />
11+
<ContentWithTargetPath Include="$(MSBuildThisFileDirectory)\..\..\libgit2\LibGit2Sharp.dll.config" TargetPath="LibGit2Sharp.dll.config" CopyToOutputDirectory="PreserveNewest" />
6112
</ItemGroup>
6213
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<Project>
2-
<Import Project="..\build\LibGit2Sharp.NativeBinaries.props" />
2+
<Import Project="$(MSBuildThisFileDirectory)\..\build\LibGit2Sharp.NativeBinaries.props" />
33
</Project>

nuget.package/buildMultiTargeting/net46/LibGit2Sharp.NativeBinaries.props

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

0 commit comments

Comments
 (0)