-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f5a062
commit 7226c5a
Showing
7 changed files
with
68 additions
and
17 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
2 changes: 0 additions & 2 deletions
2
src/xunit.runner.visualstudio/xunit.runner.visualstudio.sign-file-list
This file was deleted.
Oops, something went wrong.
Submodule common
updated
6 files
+70 −1 | models/BuildContext.cs | |
+1 −0 | models/BuildTarget.cs | |
+1 −1 | targets/Packages.cs | |
+3 −2 | targets/PublishPackages.cs | |
+10 −0 | targets/SignAssemblies.cs | |
+3 −57 | targets/SignPackages.cs |
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,38 @@ | ||
using System; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Xunit.BuildTools.Models; | ||
|
||
namespace Xunit.BuildTools.Targets; | ||
|
||
public static partial class SignAssemblies | ||
{ | ||
public static Task OnExecute(BuildContext context) | ||
{ | ||
// Check early because we don't need to make copies or show the banner for non-signed scenarios | ||
if (!context.CanSign) | ||
return Task.CompletedTask; | ||
|
||
context.BuildStep("Signing binaries"); | ||
|
||
// Note that any changes to .nuspec files means this list needs to be updated | ||
var binaries = | ||
new[] { | ||
Path.Combine(context.BaseFolder, "src", "xunit.runner.visualstudio", "bin", context.ConfigurationText, "net462", "xunit.runner.visualstudio.testadapter.dll"), | ||
Path.Combine(context.BaseFolder, "src", "xunit.runner.visualstudio", "bin", context.ConfigurationText, "net6.0", "xunit.runner.visualstudio.testadapter.dll"), | ||
}.Select(unsignedPath => | ||
{ | ||
var unsignedFolder = Path.GetDirectoryName(unsignedPath) ?? throw new InvalidOperationException($"Path '{unsignedPath}' did not have a folder"); | ||
var signedFolder = Path.Combine(unsignedFolder, "signed"); | ||
Directory.CreateDirectory(signedFolder); | ||
|
||
var signedPath = Path.Combine(signedFolder, Path.GetFileName(unsignedPath)); | ||
File.Copy(unsignedPath, signedPath, overwrite: true); | ||
|
||
return signedPath; | ||
}).ToArray(); | ||
|
||
return context.SignFiles(context.BaseFolder, binaries); | ||
} | ||
} |