Skip to content

Ease deployment of LibGit2Sharp based web sites #597 #705

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 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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 nuget.package/LibGit2Sharp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<file src="..\LICENSE.md" target="App_Readme\LibGit2Sharp.LICENSE.md" />
<file src="..\CHANGES.md" target="App_Readme\LibGit2Sharp.CHANGES.md" />
<file src="..\nuget.package\Tools\*.*" target="Tools" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we're now leveraging targets and props, do we still need the Tools folder and the *.ps1 files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, they should just be removed. Forgot to ask if its okay to just go ahead and delete all those powershell scripts from the repository?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay to just go ahead and delete all those powershell scripts from the repository?

💀 them with 🔥

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 done 😉

<file src="..\nuget.package\build\LibGit2Sharp.targets" target="build\LibGit2Sharp.targets" />
<file src="..\nuget.package\build\LibGit2Sharp.props" target="build\LibGit2Sharp.props" />
<file src="..\Lib\NativeBinaries\libgit2.license.txt" target="App_Readme" />
</files>
</package>
9 changes: 9 additions & 0 deletions nuget.package/build/LibGit2Sharp.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PipelineCollectFilesPhaseDependsOn>
CollectLibGitNativeBinaries;
$(PipelineCollectFilesPhaseDependsOn);
</PipelineCollectFilesPhaseDependsOn>
</PropertyGroup>
</Project>
27 changes: 27 additions & 0 deletions nuget.package/build/LibGit2Sharp.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyLibGit2SharpBinaries" AfterTargets="ResolveAssemblyReferences">
<CreateItem Include="%(ReferencePath.FullPath)" Condition="$([System.String]::new('%(ReferencePath.Filename)').StartsWith('LibGit2Sharp'))">
<Output TaskParameter="Include" ItemName="_LibGit2SharpReference" />
</CreateItem>
<ItemGroup>
<_LibGitFiles Include="..\packages\LibGit2Sharp.0.17.0.0\lib\net40\NativeBinaries\**\*" Condition="'%(_LibGit2SharpReference.FullPath)' != ''" />
<Content Include="%(_LibGitFiles.Identity)" Condition="'$(OutDir)' == 'bin\'">
<Link>..\$(OutDir)NativeBinaries\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="%(_LibGitFiles.Identity)" Condition="'$(OutDir)' != 'bin\'">
<Link>NativeBinaries\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Target>
<Target Name="CollectLibGitNativeBinaries">
<ItemGroup>
<_LibGitFiles Include="bin\NativeBinaries\**\*" />
<FilesForPackagingFromProject Include="%(_LibGitFiles.Identity)">
<DestinationRelativePath>bin\NativeBinaries\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>