Skip to content

Commit

Permalink
Fix use when building with mono on OSX or Linux
Browse files Browse the repository at this point in the history
Fixes #118
  • Loading branch information
AArnott committed Apr 26, 2017
1 parent 2c3d530 commit fcc1454
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@
<NoneToContentPort Include="@(None)" Condition=" '%(None.CopyToOutputDirectory)' == 'PreserveNewest' " />
<None Remove="@(NoneToContentPort)" />
<Content Include="@(NoneToContentPort)">
<Link>build\%(NoneToContentPort.Link)</Link>
<Link>build\MSBuildFull\%(NoneToContentPort.Link)</Link>
<CopyToOutputDirectory />
<PackageDirectory>build</PackageDirectory>
<PackageDirectory>build\MSBuildFull</PackageDirectory>
</Content>
<Content Include="@(NoneToContentPort)">
<Link>build\MSBuildCore\%(NoneToContentPort.Link)</Link>
<CopyToOutputDirectory />
<PackageDirectory>build\MSBuildCore</PackageDirectory>
</Content>
</ItemGroup>
</Target>
Expand Down Expand Up @@ -104,7 +109,8 @@
<ItemGroup>
<PackageFile Remove="@(PackageFile)" Condition="
$([System.String]::new('%(TargetPath)').StartsWith('build\')) and
!$([System.String]::new('%(TargetPath)').StartsWith('build\lib\')) and
!$([System.String]::new('%(TargetPath)').StartsWith('build\MSBuildFull\lib\')) and
!$([System.String]::new('%(TargetPath)').StartsWith('build\MSBuildCore\lib\')) and
'%(FileName)' != 'NerdBank.GitVersioning' and
'%(FileName)' != 'NerdBank.GitVersioning.Tasks' and
'%(FileName)' != 'MSBuildExtensionTask' and
Expand Down
2 changes: 1 addition & 1 deletion src/Nerdbank.GitVersioning.NuGet/tools/Get-CommitId.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $null = [Reflection.Assembly]::LoadFile((Resolve-Path "$DependencyBasePath\Valid
$null = [Reflection.Assembly]::LoadFile((Resolve-Path "$DependencyBasePath\NerdBank.GitVersioning.dll"))
$null = [Reflection.Assembly]::LoadFile((Resolve-Path "$DependencyBasePath\LibGit2Sharp.dll"))
$null = [Reflection.Assembly]::LoadFile((Resolve-Path "$DependencyBasePath\Newtonsoft.Json.dll"))
[Nerdbank.GitVersioning.GitExtensions]::HelpFindLibGit2NativeBinaries("$DependencyBasePath\..")
[Nerdbank.GitVersioning.GitExtensions]::HelpFindLibGit2NativeBinaries($DependencyBasePath)

$ProjectDirectory = (Resolve-Path $ProjectDirectory).ProviderPath
$GitPath = $ProjectDirectory
Expand Down
2 changes: 1 addition & 1 deletion src/Nerdbank.GitVersioning.NuGet/tools/Get-Version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $null = [Reflection.Assembly]::LoadFile((Resolve-Path "$DependencyBasePath\Newto
$ProjectDirectory = (Resolve-Path $ProjectDirectory).ProviderPath

try {
[Nerdbank.GitVersioning.GitExtensions]::HelpFindLibGit2NativeBinaries("$DependencyBasePath\..")
[Nerdbank.GitVersioning.GitExtensions]::HelpFindLibGit2NativeBinaries($DependencyBasePath)
$CloudBuild = [Nerdbank.GitVersioning.CloudBuild]::Active
$VersionOracle = [Nerdbank.GitVersioning.VersionOracle]::Create($ProjectDirectory, $null, $CloudBuild)
$VersionOracle
Expand Down
2 changes: 1 addition & 1 deletion src/Nerdbank.GitVersioning.Tasks/GetBuildVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public GetBuildVersion()
[Output]
public ITaskItem[] CloudBuildVersionVars { get; private set; }

protected override string UnmanagedDllDirectory => GitExtensions.FindLibGit2NativeBinaries(this.TargetsPath);
protected override string UnmanagedDllDirectory => GitExtensions.FindLibGit2NativeBinaries(Path.Combine(this.TargetsPath, "MSBuildFull"));

protected override bool ExecuteInner()
{
Expand Down

0 comments on commit fcc1454

Please sign in to comment.