Skip to content

NuGet improvements. #896

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ LibGit2Sharp/Core/UniqueIdentifier.cs
!Lib/NativeBinaries/*/*.pdb
!nuget.package/build/
_NCrunch_LibGit2Sharp/

!packages/**
4 changes: 4 additions & 0 deletions .nuget/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NuGet.CommandLine" version="2.8.0" />
</packages>
2 changes: 1 addition & 1 deletion CI/travis.osx.install.deps.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -ev

MONO_VER=3.6.0
MONO_VER=3.10.0

brew update
which cmake || brew install cmake
Expand Down
14 changes: 14 additions & 0 deletions LibGit2Sharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGit2Sharp", "LibGit2Sharp\LibGit2Sharp.csproj", "{EE6ED99F-CB12-4683-B055-D28FC7357A34}"
ProjectSection(ProjectDependencies) = postProject
{9C38E2A8-8ACF-431F-A2EA-A7A9A7CCCB4E} = {9C38E2A8-8ACF-431F-A2EA-A7A9A7CCCB4E}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGit2Sharp.Tests", "LibGit2Sharp.Tests\LibGit2Sharp.Tests.csproj", "{286E63EB-04DD-4ADE-88D6-041B57800761}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NativeNuGet", "NativeNuGet\NativeNuGet.proj", "{9C38E2A8-8ACF-431F-A2EA-A7A9A7CCCB4E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{5CB88E5F-0230-4B33-AF3B-6BE5B0CD9A78}"
ProjectSection(SolutionItems) = preProject
.nuget\packages.config = .nuget\packages.config
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -19,6 +29,10 @@ Global
{286E63EB-04DD-4ADE-88D6-041B57800761}.Debug|Any CPU.Build.0 = Debug|Any CPU
{286E63EB-04DD-4ADE-88D6-041B57800761}.Release|Any CPU.ActiveCfg = Release|Any CPU
{286E63EB-04DD-4ADE-88D6-041B57800761}.Release|Any CPU.Build.0 = Release|Any CPU
{9C38E2A8-8ACF-431F-A2EA-A7A9A7CCCB4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C38E2A8-8ACF-431F-A2EA-A7A9A7CCCB4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C38E2A8-8ACF-431F-A2EA-A7A9A7CCCB4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C38E2A8-8ACF-431F-A2EA-A7A9A7CCCB4E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
15 changes: 14 additions & 1 deletion LibGit2Sharp/LibGit2Sharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>a1631da7</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -342,6 +343,11 @@
<ItemGroup>
<EmbeddedResource Include="libgit2sharp_hash.txt" />
</ItemGroup>
<ItemGroup>
<None Include="LibGit2Sharp.nuspec" />
<None Include="NuGet.targets" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="UniqueIdentifier.targets" />
<PropertyGroup>
Expand All @@ -353,11 +359,18 @@
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<Import Project="..\packages\NuGet.for.MSBuild.1.4.3\build\NuGet.for.MSBuild.targets" Condition="Exists('..\packages\NuGet.for.MSBuild.1.4.3\build\NuGet.for.MSBuild.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NuGet.for.MSBuild.1.4.3\build\NuGet.for.MSBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NuGet.for.MSBuild.1.4.3\build\NuGet.for.MSBuild.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
27 changes: 27 additions & 0 deletions LibGit2Sharp/LibGit2Sharp.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>$id$</id>
<version>$version$</version>
<authors>$author$</authors>
<owners>nulltoken</owners>
<licenseUrl>https://github.com/libgit2/libgit2sharp/raw/master/LICENSE.md</licenseUrl>
<iconUrl>https://github.com/libgit2/libgit2sharp/raw/master/square-logo.png</iconUrl>
<projectUrl>https://github.com/libgit2/libgit2sharp/</projectUrl>
<releaseNotes>https://github.com/libgit2/libgit2sharp/blob/master/CHANGES.md#libgit2sharp-changes</releaseNotes>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<tags>libgit2 git wrapper bindings API dvcs vcs</tags>
<references>
<reference file="LibGit2Sharp.dll" />
</references>
<dependencies>
<dependency id="LibGit2.Native" version="0.21.3" />
</dependencies>
</metadata>
<files>
<file src="..\..\..\README.md" target="App_Readme\LibGit2Sharp.README.md" />
<file src="..\..\..\LICENSE.md" target="App_Readme\LibGit2Sharp.LICENSE.md" />
<file src="..\..\..\CHANGES.md" target="App_Readme\LibGit2Sharp.CHANGES.md" />
</files>
</package>
9 changes: 9 additions & 0 deletions LibGit2Sharp/NuGet.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="DisplayMessages" BeforeTargets="Build">
<Message Text="ProjectPath = '$(ProjectPath)'" Importance="high"/>
</Target>
<PropertyGroup>
<BuildNuGetSymbolsPackage>true</BuildNuGetSymbolsPackage>
<CustomNuGetPackSwitches></CustomNuGetPackSwitches>
</PropertyGroup>
</Project>
4 changes: 4 additions & 0 deletions LibGit2Sharp/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NuGet.for.MSBuild" version="1.4.3" targetFramework="net40" developmentDependency="true" />
</packages>
21 changes: 21 additions & 0 deletions NativeNuGet/LibGit2.Native.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="Build">

<PropertyGroup>
<BuildDependsOn>
$(BuildDependsOn);
CopyNativeBinaries;
</BuildDependsOn>
</PropertyGroup>

<Target Name="CopyNativeBinaries">
<CreateItem Include="$(SolutionDir)packages\LibGit2.Native.0.21.0\libs\**\*.*">
<Output TaskParameter="Include" ItemName="NativeBinaries"/>
</CreateItem>
<Copy
SourceFiles="@(NativeBinaries)"
DestinationFolder="$(TargetDir)%(RecursiveDir)"
SkipUnchangedFiles="true"/>
</Target>
</Project>
26 changes: 26 additions & 0 deletions NativeNuGet/NativeNuGet.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>LibGit2.Native</id>
<version>0.21.3</version>
<authors>The LibGit2 Authors</authors>
<owners>nulltoken</owners>
<licenseUrl>https://github.com/libgit2/objective-git/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/libgit2/libgit2/</projectUrl>
<iconUrl>https://github.com/libgit2/libgit2sharp/raw/master/square-logo.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Native libraries for LibGit2, primarily for use with LibGit2Sharp.</description>
<tags>libgit2 libgit2sharp git wrapper bindings API dvcs vcs</tags>
</metadata>
<files>
<file src="..\..\LibGit2.Native.targets" target="build" />
<file src="..\..\..\Lib\NativeBinaries\amd64\*.dll" target="libs\NativeBinaries\x64" />
<file src="..\..\..\Lib\NativeBinaries\amd64\*.pdb" target="libs\NativeBinaries\x64" />
<file src="..\..\..\Lib\NativeBinaries\x86\*.dll" target="libs\NativeBinaries\x86" />
<file src="..\..\..\Lib\NativeBinaries\x86\*.pdb" target="libs\NativeBinaries\x86" />
<file src="..\..\..\README.md" target="App_Readme\LibGit2Sharp.README.md" />
<file src="..\..\..\LICENSE.md" target="App_Readme\LibGit2Sharp.LICENSE.md" />
<file src="..\..\..\CHANGES.md" target="App_Readme\LibGit2Sharp.CHANGES.md" />
<file src="..\..\..\Lib\NativeBinaries\libgit2.license.txt" target="App_Readme" />
</files>
</package>
61 changes: 61 additions & 0 deletions NativeNuGet/NativeNuGet.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9C38E2A8-8ACF-431F-A2EA-A7A9A7CCCB4E}</ProjectGuid>
<NuGetPackageImportStamp>2fcb7f08</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Include="LibGit2.Native.targets" />
<None Include="NativeNuGet.nuspec">
<SubType>Designer</SubType>
</None>
<None Include="NativeNuGet.targets">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<PropertyGroup>
<OutDirWasSpecified Condition=" '$(OutDir)'!='' and '$(OutDirWasSpecified)'=='' ">true</OutDirWasSpecified>
<OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir>
<OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
<ProjectFileName Condition=" '$(ProjectFileName)' == '' ">$(MSBuildProjectFile)</ProjectFileName>
<ProjectExt Condition=" '$(ProjectExt)' == '' ">$(MSBuildProjectExtension)</ProjectExt>
<TargetDir Condition="'$(OutDir)' != ''">$([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))))</TargetDir>
<ProjectDir Condition=" '$(ProjectDir)' == '' ">$(MSBuildProjectDirectory)\</ProjectDir>
<ProjectPath Condition=" '$(ProjectPath)' == '' ">$(ProjectDir)$(ProjectFileName)</ProjectPath>
<PlatformName Condition=" '$(PlatformName)' == '' ">$(Platform)</PlatformName>
</PropertyGroup>
<PropertyGroup>
<CoreCleanDependsOn />
<BuildDependsOn>
PrepareForBuild;
</BuildDependsOn>
</PropertyGroup>
<Target Name="PrepareForBuild">
<MakeDir Directories="$(OutputPath)" />
</Target>
<Target Name="Clean" DependsOnTargets="$(CoreCleanDependsOn)">
<RemoveDir Directories="$(OutputPath)" />
</Target>
<Target Name="GetNativeManifest" />
<Target Name="GetCopyToOutputDirectoryItems" />
<Target Name="Build" DependsOnTargets="$(BuildDependsOn)" />
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<Import Project="$(ProjectDir)NativeNuGet.targets" />
<Import Project="..\packages\NuGet.for.MSBuild.1.4.3\build\NuGet.for.MSBuild.targets" Condition="Exists('..\packages\NuGet.for.MSBuild.1.4.3\build\NuGet.for.MSBuild.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NuGet.for.MSBuild.1.4.3\build\NuGet.for.MSBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NuGet.for.MSBuild.1.4.3\build\NuGet.for.MSBuild.targets'))" />
</Target>
</Project>
6 changes: 6 additions & 0 deletions NativeNuGet/NativeNuGet.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseNuspecOnly>true</UseNuspecOnly>
<CustomNuGetPackSwitches>-NoPackageAnalysis</CustomNuGetPackSwitches>
</PropertyGroup>
</Project>
4 changes: 4 additions & 0 deletions NativeNuGet/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NuGet.for.MSBuild" version="1.4.3" targetFramework="net40" developmentDependency="true" />
</packages>
Binary file not shown.
Binary file added packages/NuGet.CommandLine.2.8.0/tools/NuGet.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading