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:
authorEdward Thomson <ethomson@edwardthomson.com>2015-07-16 19:42:26 +0300
committernulltoken <emeric.fermas@gmail.com>2015-08-23 16:47:53 +0300
commit0328d59c054b3957021b461b5064bf43742ad465 (patch)
treeae3946783cc94e414d1ea184fff85b8c8dc43715
parentfd54ae3ba6c78d935d18642ec623de3b7236a1b9 (diff)
GenerateNativeDll task: use file name from nuget
Use the `libgit2_filename.txt` from the NuGet package instead of trying to derive it based on the hash.
-rw-r--r--Lib/CustomBuildTasks/CustomBuildTasks.dllbin5632 -> 5632 bytes
-rw-r--r--Lib/CustomBuildTasks/GenerateNativeDllNameTask.cs10
-rw-r--r--LibGit2Sharp/NativeDllName.targets2
3 files changed, 5 insertions, 7 deletions
diff --git a/Lib/CustomBuildTasks/CustomBuildTasks.dll b/Lib/CustomBuildTasks/CustomBuildTasks.dll
index a6f06156..cd763a2e 100644
--- a/Lib/CustomBuildTasks/CustomBuildTasks.dll
+++ b/Lib/CustomBuildTasks/CustomBuildTasks.dll
Binary files differ
diff --git a/Lib/CustomBuildTasks/GenerateNativeDllNameTask.cs b/Lib/CustomBuildTasks/GenerateNativeDllNameTask.cs
index f6872497..9b31fba3 100644
--- a/Lib/CustomBuildTasks/GenerateNativeDllNameTask.cs
+++ b/Lib/CustomBuildTasks/GenerateNativeDllNameTask.cs
@@ -14,27 +14,25 @@ namespace CustomBuildTasks
public override bool Execute()
{
var fileName = InputHashFile.GetMetadata("FullPath");
- string hash;
+ string libgit2FileName;
using (var sr = new StreamReader(fileName))
{
- hash = sr.ReadLine();
+ libgit2FileName = sr.ReadLine();
}
- var shortHash = hash.Substring(0, 7);
-
var nativeDllName = @"namespace LibGit2Sharp.Core
{{
internal static class NativeDllName
{{
- public const string Name = ""git2-{0}"";
+ public const string Name = ""{0}"";
}}
}}
";
using (var sw = new StreamWriter(OutputFile))
{
- sw.Write(nativeDllName, shortHash);
+ sw.Write(nativeDllName, libgit2FileName);
}
return true;
diff --git a/LibGit2Sharp/NativeDllName.targets b/LibGit2Sharp/NativeDllName.targets
index 33261d59..a6afed50 100644
--- a/LibGit2Sharp/NativeDllName.targets
+++ b/LibGit2Sharp/NativeDllName.targets
@@ -14,7 +14,7 @@
<Target Name="GenerateNativeDllNameCs"
Inputs="@(EmbeddedResource)"
Outputs="$(NativeDllNamePath)">
- <GenerateNativeDllNameTask InputHashFile="@(EmbeddedResource)" Condition=" '%(Filename)%(Extension)' == 'libgit2_hash.txt' " OutputFile="$(NativeDllNamePath)" />
+ <GenerateNativeDllNameTask InputHashFile="@(EmbeddedResource)" Condition=" '%(Filename)%(Extension)' == 'libgit2_filename.txt' " OutputFile="$(NativeDllNamePath)" />
</Target>
<Target Name="CleanNativeDllNameCs">