Skip to content

Commit 066cf3c

Browse files
committed
1 parent 339363e commit 066cf3c

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

appveyor.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ init:
2727
- git config --global core.autocrlf true
2828

2929
install:
30-
- ps: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
31-
- cmd: appveyor-tools\secure-file -decrypt StrongKey.snk.enc -secret %STRONG_KEY_DECRYPT%
30+
- ps: |
31+
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER)
32+
{
33+
iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
34+
appveyor-tools\secure-file -decrypt StrongKey.snk.enc -secret $env:STRONG_KEY_DECRYPT
35+
}
3236
3337
build_script:
3438
- ps: .\build.ps1 -target $env:TARGET -configuration $env:CONFIGURATION

build.cake

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,26 @@ Task("Sign-Assemblies")
7979
.IsDependentOn("Build")
8080
.Does(() =>
8181
{
82-
var assemblies = GetFiles("./src/**/*.dll");
82+
var assemblies = GetFiles("./src/*/bin/Release/*/Sharpbrake*.dll");
8383

8484
FilePath snPath = null;
8585
foreach (var file in GetFiles("C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\**\\sn.exe")) {
8686
snPath = file;
8787
break;
8888
}
89+
Information("SN Tool " + snPath.FullPath);
90+
var sign = FileExists("./StrongKey.snk");
8991
foreach (var assembly in assemblies) {
90-
StartProcess(snPath, "-R \"" + assembly.FullPath + "\" ./StrongKey.snk");
92+
if (sign)
93+
{
94+
Information("Trying to resign assembly " + assembly.FullPath);
95+
StartProcess(snPath, "-R \"" + assembly.FullPath + "\" ./StrongKey.snk");
96+
}
97+
else
98+
{
99+
Information("Registering assembly for verification skipping " + assembly.FullPath);
100+
StartProcess(snPath, "-Vr \"" + assembly.FullPath + "\"");
101+
}
91102
}
92103
});
93104

0 commit comments

Comments
 (0)