Skip to content

Commit 6530e9f

Browse files
committed
Sign Assemblies
1 parent e52cc23 commit 6530e9f

File tree

4 files changed

+34
-18
lines changed

4 files changed

+34
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,4 @@ projects/client/Unit*/TestResult.xml
9999
# Vim
100100
.sw?
101101
.*.sw?
102+
rabbit.snk

appveyor.props.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<PropTargetFramework>v4.0</PropTargetFramework>
5+
<PropUsingMono>@USINGMONO@</PropUsingMono>
6+
<PropLaunchExe Condition="'$(PropUsingMono)' == 'true'">mono </PropLaunchExe>
7+
<PropBuildWinRT>@BUILDWINRT@</PropBuildWinRT>
8+
<PropBuildWcf Condition="'$(PropUsingMono)' != 'true'">true</PropBuildWcf>
9+
<PropAssemblyVersion>@APPVEYOR_BUILD_VERSION@</PropAssemblyVersion>
10+
<PropKeyfile>$(MSBuildProjectDirectory)\@KEYFILE@</PropKeyfile>
11+
</PropertyGroup>
12+
</Project>

appveyor.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,32 @@ platform: Any CPU
77
configuration: Release
88
skip_tags: true
99

10+
environment:
11+
BUILDWINRT: true
12+
USINGMONO: false
13+
KEYFILE: rabbitmq.snk
14+
SNKSECRET:
15+
secure: C8FL0UTKVN8YcMW1wdssabbkSWMIrpJTqgUNeI2NfQw=
16+
1017
init:
1118
- choco install -y erlang
1219
- choco install -y rabbitmq
1320

14-
before_build:
15-
- copy "Local.props.example" "Local.props"
21+
install:
22+
- nuget install secure-file -ExcludeVersion
23+
- secure-file\tools\secure-file -decrypt rabbitmq.snk.enc -secret %SNKSECRET%
1624
- ps: |
17-
$localpropsitem = Get-ChildItem ".\Local.props"
18-
$xml = New-Object -TypeName XML
19-
$xml.Load($localpropsitem)
20-
$xml.Project.PropertyGroup.PropAssemblyVersion = ${env:APPVEYOR_BUILD_VERSION}
21-
$xml.Save($localpropsitem)
25+
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ"
26+
if (Test-Path "HKLM:\SOFTWARE\Wow6432Node\") { $regPath = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" }
27+
$path = Split-Path -Parent (Get-ItemProperty $regPath "UninstallString").UninstallString
28+
$version = (Get-ItemProperty $regPath "DisplayVersion").DisplayVersion
29+
[Environment]::SetEnvironmentVariable("RABBITMQ_HOME", "$path\rabbitmq_server-$version", "Machine")
30+
$env:RABBITMQ_HOME = "$path\rabbitmq_server-$version"
31+
[Environment]::SetEnvironmentVariable("RABBITMQ_RABBITMQCTL_PATH", "$path\rabbitmq_server-$version\sbin\rabbitmqctl.bat", "Machine")
32+
$env:RABBITMQ_RABBITMQCTL_PATH = "$path\rabbitmq_server-$version\sbin\rabbitmqctl.bat"
33+
34+
before_build:
35+
- copy "appveyor.props.in" "Local.props"
2236

2337
build:
2438
parallel: false
@@ -35,17 +49,6 @@ after_build:
3549
nuget pack RabbitMQ.Client.nuspec -version $semver -symbols
3650
nuget pack RabbitMQ.ServiceModel.nuspec -version $semver -symbols
3751
38-
install:
39-
- ps: |
40-
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ"
41-
if (Test-Path "HKLM:\SOFTWARE\Wow6432Node\") { $regPath = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" }
42-
$path = Split-Path -Parent (Get-ItemProperty $regPath "UninstallString").UninstallString
43-
$version = (Get-ItemProperty $regPath "DisplayVersion").DisplayVersion
44-
[Environment]::SetEnvironmentVariable("RABBITMQ_HOME", "$path\rabbitmq_server-$version", "Machine")
45-
$env:RABBITMQ_HOME = "$path\rabbitmq_server-$version"
46-
[Environment]::SetEnvironmentVariable("RABBITMQ_RABBITMQCTL_PATH", "$path\rabbitmq_server-$version\sbin\rabbitmqctl.bat", "Machine")
47-
$env:RABBITMQ_RABBITMQCTL_PATH = "$path\rabbitmq_server-$version\sbin\rabbitmqctl.bat"
48-
4952
test:
5053
assemblies:
5154
- '**\build\bin\unit-tests.dll'

rabbit.snk.enc

608 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)