Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 75c8b74

Browse files
committed
Replace [un]install.ps1 NuGet hooks with imported .targets
Fix libgit2#425 Consumer now require NuGet 2.5 to update/install LibGit2Sharp packages.
1 parent c000936 commit 75c8b74

File tree

6 files changed

+16
-36
lines changed

6 files changed

+16
-36
lines changed

nuget.package/LibGit2Sharp.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
2-
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3-
<metadata>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
3+
<metadata minClientVersion="2.5">
44
<id>$id$</id>
55
<version>$version$</version>
66
<authors>$author$</authors>
@@ -18,7 +18,7 @@
1818
<file src="..\README.md" target="App_Readme\LibGit2Sharp.README.md" />
1919
<file src="..\LICENSE.md" target="App_Readme\LibGit2Sharp.LICENSE.md" />
2020
<file src="..\CHANGES.md" target="App_Readme\LibGit2Sharp.CHANGES.md" />
21-
<file src="..\nuget.package\Tools\*.*" target="Tools" />
21+
<file src="..\nuget.package\build\*.*" target="build" />
2222
<file src="..\Lib\NativeBinaries\libgit2.license.txt" target="App_Readme" />
2323
</files>
2424
</package>

nuget.package/Tools/GetLibGit2SharpPostBuildCmd.ps1

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

nuget.package/Tools/install.ps1

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

nuget.package/Tools/uninstall.ps1

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

nuget.package/build.nuget.package.cmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ SET BASEDIR=%~dp0
33
SET SRCDIR=%BASEDIR%..\LibGit2Sharp\
44
SET CommitSha=%~1
55

6+
IF "%CommitSha%" == "" (
7+
ECHO "Please provide the Libgit2Sharp commit Sha this package is being built from."
8+
EXIT /B 1
9+
)
10+
611
REM the nuspec file needs to be next to the csproj, so copy it there during the pack operation
712
COPY "%BASEDIR%LibGit2Sharp.nuspec" "%SRCDIR%"
813

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Target Name="AfterBuild">
3+
<CreateItem Include="$(MSBuildThisFileDirectory)..\NativeBinaries\**\*.*">
4+
<Output TaskParameter="Include" ItemName="NativeBinaries" />
5+
</CreateItem>
6+
<Copy SourceFiles="@(NativeBinaries)" DestinationFiles="@(NativeBinaries->'$(OutputPath)NativeBinaries\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
7+
</Target>
8+
</Project>

0 commit comments

Comments
 (0)