Skip to content

Commit 97aec7a

Browse files
committed
Move Scripts To Relevant Sections
1 parent 6690826 commit 97aec7a

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

appveyor.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,14 @@ init:
1111
- choco install -y erlang
1212
- choco install -y rabbitmq
1313

14-
install:
14+
before_build:
1515
- copy "Local.props.example" "Local.props"
1616
- 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)
22-
- ps: |
23-
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ"
24-
if (Test-Path "HKLM:\SOFTWARE\Wow6432Node\") { $regPath = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" }
25-
$path = Split-Path -Parent (Get-ItemProperty $regPath "UninstallString").UninstallString
26-
$version = (Get-ItemProperty $regPath "DisplayVersion").DisplayVersion
27-
[Environment]::SetEnvironmentVariable("RABBITMQ_HOME", "$path\rabbitmq_server-$version", "User")
28-
[Environment]::SetEnvironmentVariable("RABBITMQ_RABBITMQCTL_PATHen", "$path\rabbitmq_server-$version\sbin\rabietmqctl.bat", "User")
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)
2922
3023
build:
3124
parallel: true
@@ -35,6 +28,15 @@ build:
3528
include_nuget_references: false
3629
verbosity: normal
3730

31+
before_test:
32+
- ps: |
33+
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ"
34+
if (Test-Path "HKLM:\SOFTWARE\Wow6432Node\") { $regPath = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" }
35+
$path = Split-Path -Parent (Get-ItemProperty $regPath "UninstallString").UninstallString
36+
$version = (Get-ItemProperty $regPath "DisplayVersion").DisplayVersion
37+
[Environment]::SetEnvironmentVariable("RABBITMQ_HOME", "$path\rabbitmq_server-$version", "User")
38+
[Environment]::SetEnvironmentVariable("RABBITMQ_RABBITMQCTL_PATHen", "$path\rabbitmq_server-$version\sbin\rabietmqctl.bat", "User")
39+
3840
test_script:
3941
- cd c:\projects\rabbitmq-dotnet-client
4042
- tools\nunit\bin\nunit-console.exe /framework:net-4.5 -config=Debug projects/client/Unit/RabbitMQ.Client.Unit.csproj

0 commit comments

Comments
 (0)