-
Notifications
You must be signed in to change notification settings - Fork 899
Libgit2 dll naming #430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libgit2 dll naming #430
Changes from 4 commits
0fd7929
8e2b912
223d6c7
111a141
2a38ace
bff5baf
50f381b
53eae23
ce98f39
ccc4028
22cd4f6
d0ae056
990ef1e
f165bcc
0f80a8c
1966142
6a7a2a4
eef528f
f633cec
c877dd5
91c4ad4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
| ||
namespace LibGit2Sharp.Core | ||
{ | ||
internal static partial class NativeMethods | ||
{ | ||
private const string libgit2 = "git2_b641c00"; | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ Param( | |
[switch]$debug | ||
) | ||
|
||
|
||
Set-StrictMode -Version Latest | ||
|
||
$self = Split-Path -Leaf $MyInvocation.MyCommand.Path | ||
|
@@ -89,6 +90,12 @@ function Find-Git { | |
throw "Error: Can't find git" | ||
} | ||
|
||
function Rename-Binaries ([string]$extension) { | ||
ls | foreach { | ||
mv $_ ($_.BaseName + "_" + $extension + $_.Extension) | ||
} | ||
} | ||
|
||
Push-Location $libgit2Directory | ||
|
||
& { | ||
|
@@ -111,6 +118,7 @@ Push-Location $libgit2Directory | |
popd | ||
break | ||
} | ||
$shortsha = $sha.Substring(0,7) | ||
|
||
Write-Output "Checking out $sha..." | ||
Run-Command -Quiet -Fatal { & $git checkout $sha } | ||
|
@@ -124,6 +132,7 @@ Push-Location $libgit2Directory | |
if ($test.IsPresent) { Run-Command -Quiet -Fatal { & $ctest -V . } } | ||
cd $configuration | ||
Run-Command -Quiet { & rm *.exp } | ||
Rename-Binaries $shortsha | ||
Run-Command -Quiet -Fatal { & copy -fo * $x86Directory } | ||
|
||
Write-Output "Building 64-bit..." | ||
|
@@ -135,10 +144,22 @@ Push-Location $libgit2Directory | |
if ($test.IsPresent) { Run-Command -Quiet -Fatal { & $ctest -V . } } | ||
cd $configuration | ||
Run-Command -Quiet { & rm *.exp } | ||
Rename-Binaries $shortsha | ||
Run-Command -Quiet -Fatal { & copy -fo * $x64Directory } | ||
|
||
Write-Output "Done!" | ||
pop-location | ||
$dllNameClass = " | ||
namespace LibGit2Sharp.Core | ||
{ | ||
internal static partial class NativeMethods | ||
{ | ||
private const string libgit2 = `"git2_$shortsha`"; | ||
} | ||
} | ||
" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use a "here-string" to avoid escaping:
|
||
sc -Encoding UTF8 .\Libgit2sharp\Core\NativeDllName.cs $dllNameClass | ||
sc -Encoding UTF8 libgit2sharp\libgit2_hash.txt $sha | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we make this one ASCII? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made them all ASCII. BOMs suck, man. |
||
|
||
Write-Output "Done!" | ||
} | ||
exit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a letfover from the T4 tryout. You're right, it should be removed.