This repository has been archived by the owner on Apr 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SourceLink.Test nupkg #136 * adjusted readme for trying out 2.0.0 * fix appveyor url * remove SourceLink.props * remove props reference mistake * debug appveyor paths * try removing duplicate slash * check powershell version * set location * try including build output * don't rename and separte out OutputPath * include explicit dll reference * forgot the $ * root cause *.targets;$(OutputPath)*.* didn't work on appveyor * guess not, try just dlls * explicit for msbuild projects * adjust tool help
- Loading branch information
Showing
15 changed files
with
177 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard1.6</TargetFramework> | ||
<!-- https://github.com/NuGet/Home/wiki/Adding-nuget-pack-as-a-msbuild-target --> | ||
<IncludeBuildOutput>false</IncludeBuildOutput> | ||
|
||
<Authors>Cameron Taggart</Authors> | ||
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl> | ||
<PackageIconUrl>https://ctaggart.github.io/SourceLink/SourceLink128.jpg</PackageIconUrl> | ||
<PackageProjectUrl>https://github.com/ctaggart/SourceLink</PackageProjectUrl> | ||
<PackageTags>sourcelink pdb symbols git sourceindexing debugging sourceserver build</PackageTags> | ||
<Description> | ||
SourceLink: Source Code On Demand | ||
Source Link your Portable PDB files to allow source code to be downloaded on demand | ||
</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="14.3.0" /> | ||
</ItemGroup> | ||
|
||
<!-- https://docs.microsoft.com/en-us/dotnet/articles/core/preview3/tools/extensibility --> | ||
<ItemGroup Label="dotnet pack instructions"> | ||
<Content Include="SourceLink.Test.targets"> | ||
<Pack>true</Pack> | ||
<PackagePath>build</PackagePath> | ||
</Content> | ||
<Content Include="$(OutputPath)SourceLink.Test.dll"> | ||
<Pack>true</Pack> | ||
<PackagePath>build</PackagePath> | ||
</Content> | ||
<Content Include="$(OutputPath)SourceLink.Test.deps.json"> | ||
<Pack>true</Pack> | ||
<PackagePath>build</PackagePath> | ||
</Content> | ||
<Content Include="$(OutputPath)SourceLink.Test.pdb"> | ||
<Pack>true</Pack> | ||
<PackagePath>build</PackagePath> | ||
</Content> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="..\SourceLink.Create.GitHub\Process.cs" Link="Process.cs" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<UsingTask TaskName="SourceLink.Test.TestTask" AssemblyFile="SourceLink.Test.dll" /> | ||
|
||
<PropertyGroup> | ||
<!-- enable only in CI environments by default --> | ||
<SourceLinkTest Condition="'$(SourceLinkTest)' == ''">$(CI)</SourceLinkTest> | ||
<CompileDependsOn Condition="'$(SourceLinkTest)' == 'true'">$(CompileDependsOn);SourceLinkTest</CompileDependsOn> | ||
<SourceLinkPdb Condition="'$(SourceLinkPdb)' == ''">$(PdbFile)</SourceLinkPdb> | ||
<SourceLinkPdb Condition="'$(SourceLinkPdb)' == ''">$(IntermediateOutputPath)$(TargetName).pdb</SourceLinkPdb> | ||
</PropertyGroup> | ||
|
||
<Target Name="SourceLinkTest"> | ||
<SourceLink.Test.TestTask Pdb="$(SourceLinkPdb)" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Microsoft.Build.Framework; | ||
using MSBuildTask = Microsoft.Build.Utilities.Task; | ||
using System.Diagnostics; | ||
using System.Text; | ||
|
||
namespace SourceLink.Test | ||
{ | ||
public class TestTask : MSBuildTask | ||
{ | ||
[Required] | ||
public string Pdb { get; set; } | ||
|
||
public override bool Execute() | ||
{ | ||
var sbArgs = new StringBuilder(); | ||
sbArgs.Append("sourcelink test"); | ||
sbArgs.Append(" \"" + Pdb + "\""); | ||
var args = sbArgs.ToString(); | ||
|
||
var create = Process.RunAndGetOutput("dotnet", args); | ||
if (create.ExitCode != 0) | ||
{ | ||
Log.LogMessage(MessageImportance.High, "dotnet " + args); | ||
foreach (var line in create.OutputLines) | ||
Log.LogMessage(MessageImportance.High, line); | ||
Log.LogError("exit code " + create.ExitCode + " when running: dotnet " + args); | ||
} | ||
else | ||
{ | ||
Log.LogMessage(MessageImportance.Normal, "dotnet " + args); | ||
foreach (var line in create.OutputLines) | ||
Log.LogMessage(MessageImportance.Normal, line); | ||
} | ||
|
||
return !Log.HasLoggedErrors; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Reflection; | ||
|
||
namespace SourceLink | ||
{ | ||
public static class Version | ||
{ | ||
public static string GetAssemblyInformationalVersion() | ||
{ | ||
var assembly = Assembly.GetEntryAssembly(); | ||
var attribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>(); | ||
if (attribute == null) return null; | ||
return attribute.InformationalVersion; | ||
} | ||
} | ||
} |