Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2011-05-12 22:20:33 +0400
committernulltoken <emeric.fermas@gmail.com>2011-05-12 22:43:43 +0400
commit5a47dc45363e078db0f701384c820c27d6ec2548 (patch)
treee670571cb59f00bdb9e2d5b0fc3b1f519dfd19e8 /nuget.package
parent1d544e888df4b6f02d393518b5f5f79b03c49afb (diff)
Fix NuGet packagingv0.1.1
Credit goes to @davidebbo for the excellent work and support
Diffstat (limited to 'nuget.package')
-rw-r--r--nuget.package/LibGit2Sharp.nuspec24
-rw-r--r--nuget.package/Tools/GetLibGit2SharpPostBuildCmd.ps18
-rw-r--r--nuget.package/Tools/install.ps111
-rw-r--r--nuget.package/Tools/uninstall.ps19
4 files changed, 52 insertions, 0 deletions
diff --git a/nuget.package/LibGit2Sharp.nuspec b/nuget.package/LibGit2Sharp.nuspec
new file mode 100644
index 00000000..49a6c85c
--- /dev/null
+++ b/nuget.package/LibGit2Sharp.nuspec
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
+ <metadata>
+ <id>LibGit2Sharp</id>
+ <version>0.1.1</version>
+ <authors>LibGit2Sharp contributors</authors>
+ <owners>nulltoken</owners>
+ <licenseUrl>https://github.com/libgit2/libgit2sharp/raw/master/LICENSE.md</licenseUrl>
+ <projectUrl>https://github.com/libgit2/libgit2sharp/</projectUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>.Net bindings for libgit2</description>
+ <tags>libgit2 git wrapper bindings API</tags>
+ </metadata>
+ <files>
+ <file src="..\build\LibGit2Sharp.dll" target="lib\Net35" />
+ <file src="..\build\LibGit2Sharp.pdb" target="lib\Net35" />
+ <file src="..\build\LibGit2Sharp.xml" target="lib\Net35" />
+ <file src="..\build\git2.dll" target="NativeBinaries\x86" />
+ <file src="..\README.md" target="App_Readme\LibGit2Sharp.README.md" />
+ <file src="..\LICENSE.md" target="App_Readme\LibGit2Sharp.LICENSE.md" />
+ <file src="..\CHANGELOG.md" target="App_Readme\LibGit2Sharp.CHANGELOG.md" />
+ <file src="Tools\*.*" target="Tools" />
+ </files>
+</package> \ No newline at end of file
diff --git a/nuget.package/Tools/GetLibGit2SharpPostBuildCmd.ps1 b/nuget.package/Tools/GetLibGit2SharpPostBuildCmd.ps1
new file mode 100644
index 00000000..35cf68ef
--- /dev/null
+++ b/nuget.package/Tools/GetLibGit2SharpPostBuildCmd.ps1
@@ -0,0 +1,8 @@
+$solutionDir = [System.IO.Path]::GetDirectoryName($dte.Solution.FullName) + "\"
+$path = $installPath.Replace($solutionDir, "`$(SolutionDir)")
+
+$NativeAssembliesDir = Join-Path $path "NativeBinaries"
+$x86 = $(Join-Path $NativeAssembliesDir "x86\*.*")
+
+$LibGit2SharpPostBuildCmd = "
+xcopy /s /y `"$x86`" `"`$(TargetDir)`"" \ No newline at end of file
diff --git a/nuget.package/Tools/install.ps1 b/nuget.package/Tools/install.ps1
new file mode 100644
index 00000000..bc403c27
--- /dev/null
+++ b/nuget.package/Tools/install.ps1
@@ -0,0 +1,11 @@
+param($installPath, $toolsPath, $package, $project)
+
+. (Join-Path $toolsPath "GetLibGit2SharpPostBuildCmd.ps1")
+
+# Get the current Post Build Event cmd
+$currentPostBuildCmd = $project.Properties.Item("PostBuildEvent").Value
+
+# Append our post build command if it's not already there
+if (!$currentPostBuildCmd.Contains($LibGit2SharpPostBuildCmd)) {
+ $project.Properties.Item("PostBuildEvent").Value += $LibGit2SharpPostBuildCmd
+} \ No newline at end of file
diff --git a/nuget.package/Tools/uninstall.ps1 b/nuget.package/Tools/uninstall.ps1
new file mode 100644
index 00000000..a1854cb3
--- /dev/null
+++ b/nuget.package/Tools/uninstall.ps1
@@ -0,0 +1,9 @@
+param($installPath, $toolsPath, $package, $project)
+
+. (Join-Path $toolsPath "GetLibGit2SharpPostBuildCmd.ps1")
+
+# Get the current Post Build Event cmd
+$currentPostBuildCmd = $project.Properties.Item("PostBuildEvent").Value
+
+# Remove our post build command from it (if it's there)
+$project.Properties.Item("PostBuildEvent").Value = $currentPostBuildCmd.Replace($LibGit2SharpPostBuildCmd, "") \ No newline at end of file