Skip to content

Commit

Permalink
Merge pull request #327 from ctaggart/LibGit2Sharp
Browse files Browse the repository at this point in the history
update LibGit2Sharp to 0.27.0-preview-0007
  • Loading branch information
AArnott authored May 9, 2019
2 parents 62fb3f6 + 981ba29 commit aa87d97
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 44 deletions.
67 changes: 29 additions & 38 deletions azure-pipelines/xplattest-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,38 @@ steps:
artifactName: deployables
downloadPath: $(System.DefaultWorkingDirectory)

- task: Bash@3
- script: |
git config --global user.name ci
git config --global user.email [email protected]
displayName: Set up git username and email address
inputs:
targetType: inline
script: |
git config --global user.name ci
git config --global user.email [email protected]

- task: Bash@3
- script: >
PkgFileName=$(ls deployables/Nerdbank.GitVersioning.*nupkg)
NBGV_NuGetPackageVersion=$([[ $PkgFileName =~ Nerdbank.GitVersioning\.(.*)\.nupkg ]] && echo "${BASH_REMATCH[1]}")
echo "<configuration><packageSources><clear /><add key='local' value='deployables' /></packageSources></configuration>" > nuget.config &&
dotnet new classlib -o lib &&
cd lib &&
echo '{"version":"42.42"}' > version.json &&
git init &&
git add lib.csproj version.json Class1.cs &&
dotnet add package nerdbank.gitversioning -v $NBGV_NuGetPackageVersion &&
git commit -m "Initial commit" &&
dotnet pack -c debug &&
if ! ls bin/debug/lib.42.42.1*.nupkg 1> /dev/null 2>&1; then exit 1; fi
displayName: Consume NB.GV from .NET Core build
inputs:
failOnStderr: true
targetType: inline
script: >
PkgFileName=$(ls deployables/Nerdbank.GitVersioning.*nupkg)
NBGV_NuGetPackageVersion=$([[ $PkgFileName =~ Nerdbank.GitVersioning\.(.*)\.nupkg ]] && echo "${BASH_REMATCH[1]}")
echo "<configuration><packageSources><clear /><add key='local' value='deployables' /></packageSources></configuration>" > nuget.config &&
dotnet new classlib -o lib &&
cd lib &&
echo '{"version":"42.42"}' > version.json &&
git init &&
git add lib.csproj version.json Class1.cs &&
dotnet add package nerdbank.gitversioning -v $NBGV_NuGetPackageVersion &&
git commit -m "Initial commit" &&
dotnet pack -c debug &&
if ! ls bin/debug/lib.42.42.1*.nupkg 1> /dev/null 2>&1; then exit 1; fi
- task: Bash@3
displayName: Use nbgv dotnet CLI tool
inputs:
failOnStderr: true
targetType: inline
script: >
echo DOTNET_ROOT=$DOTNET_ROOT
failOnStderr: true

- script: >
echo DOTNET_ROOT=$DOTNET_ROOT
PkgFileName=$(ls deployables/Nerdbank.GitVersioning.*nupkg)
PkgFileName=$(ls deployables/Nerdbank.GitVersioning.*nupkg)
NBGV_NuGetPackageVersion=$([[ $PkgFileName =~ Nerdbank.GitVersioning\.(.*)\.nupkg ]] && echo "${BASH_REMATCH[1]}")
NBGV_NuGetPackageVersion=$([[ $PkgFileName =~ Nerdbank.GitVersioning\.(.*)\.nupkg ]] && echo "${BASH_REMATCH[1]}")
dotnet tool install nbgv --tool-path . --version $NBGV_NuGetPackageVersion --add-source deployables &&
./nbgv get-version -f json -p lib &&
./nbgv get-version -f json -p lib | grep 42.42.1
dotnet tool install nbgv --tool-path . --version $NBGV_NuGetPackageVersion --add-source deployables &&
./nbgv get-version -f json -p lib &&
./nbgv get-version -f json -p lib | grep 42.42.1
displayName: Use nbgv dotnet CLI tool
failOnStderr: true
2 changes: 1 addition & 1 deletion src/NerdBank.GitVersioning/NerdBank.GitVersioning.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNetMDDocs" Version="0.111.0" PrivateAssets="all" Condition=" '$(GenerateMarkdownApiDocs)' == 'true' " />
<PackageReference Include="LibGit2Sharp" Version="0.26.0-preview-0070" PrivateAssets="none" />
<PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0007" PrivateAssets="none" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="System.Diagnostics.Tools" Version="4.3.0" Condition=" '$(TargetFramework)' == 'netcoreapp2.0' " />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<LibGit2SharpNativeBinaries>$(NuGetPackageRoot)libgit2sharp.nativebinaries\1.0.258\</LibGit2SharpNativeBinaries>
<LibGit2SharpNativeBinaries>$(NuGetPackageRoot)libgit2sharp.nativebinaries\2.0.278\</LibGit2SharpNativeBinaries>
<NuspecProperties>$(NuspecProperties);Version=$(Version);commit=$(GitCommitId);BaseOutputPath=$(OutputPath);LibGit2SharpNativeBinaries=$(LibGit2SharpNativeBinaries)</NuspecProperties>
</PropertyGroup>
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
<file src="$LibGit2SharpNativeBinaries$runtimes\**" target="build\runtimes\" />

<!-- Additional copies to work around DllNotFoundException on Mono (https://github.com/AArnott/Nerdbank.GitVersioning/issues/222) -->
<file src="$LibGit2SharpNativeBinaries$runtimes\osx\native\libgit2-a904fc6.dylib" target="build\MSBuildFull\lib\osx\libgit2-a904fc6.dylib" />
<file src="$LibGit2SharpNativeBinaries$runtimes\linux-x64\native\libgit2-a904fc6.so" target="build\MSBuildFull\lib\linux\x86_64\libgit2-a904fc6.so" />
<file src="$LibGit2SharpNativeBinaries$runtimes\osx\native\libgit2-572e4d8.dylib" target="build\MSBuildFull\lib\osx\libgit2-572e4d8.dylib" />
<file src="$LibGit2SharpNativeBinaries$runtimes\linux-x64\native\libgit2-572e4d8.so" target="build\MSBuildFull\lib\linux\x86_64\libgit2-572e4d8.so" />

<!-- Additional copies to work with our own ps1 scripts (https://github.com/AArnott/Nerdbank.GitVersioning/issues/248) -->
<file src="$LibGit2SharpNativeBinaries$runtimes\win-x64\native\git2-a904fc6.dll" target="build\MSBuildFull\lib\win32\x64\git2-a904fc6.dll" />
<file src="$LibGit2SharpNativeBinaries$runtimes\win-x86\native\git2-a904fc6.dll" target="build\MSBuildFull\lib\win32\x86\git2-a904fc6.dll" />
<file src="$LibGit2SharpNativeBinaries$runtimes\win-x64\native\git2-572e4d8.dll" target="build\MSBuildFull\lib\win32\x64\git2-572e4d8.dll" />
<file src="$LibGit2SharpNativeBinaries$runtimes\win-x86\native\git2-572e4d8.dll" target="build\MSBuildFull\lib\win32\x86\git2-572e4d8.dll" />

<file src="$LibGit2SharpNativeBinaries$libgit2\LibGit2Sharp.dll.config" target="build\MSBuildCore\LibGit2Sharp.dll.config" />
<file src="$BaseOutputPath$netcoreapp2.0\LibGit2Sharp.dll" target="build\MSBuildCore\LibGit2Sharp.dll" />
Expand Down

0 comments on commit aa87d97

Please sign in to comment.