-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
54 lines (35 loc) · 2.09 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
install:
- choco install gitversion.portable -pre -y
assembly_info:
patch: false
configuration:
- Debug
services: mssql2014
before_build:
- nuget restore
- ps: gitversion /l console /output buildserver /updateAssemblyInfo
build:
project: ShowPlanParser.sln
verbosity: minimal
before_test:
- ps: >-
$startPath = "$($env:appveyor_build_folder)"
$sqlInstance = "(local)\SQL2014"
$dbName = "AdventureWorks"
# replace the db connection with the local instance
$config = join-path $startPath "tests\ShowPlanParser.EntityFramework6.Tests\bin\Debug\ShowPlanParser.EntityFramework6.Tests.dll.config"
$doc = (gc $config) -as [xml]
$doc.SelectSingleNode('//connectionStrings/add[@name="AdventureWorksContext"]').connectionString = "Server=$sqlInstance; Database=$dbName; Trusted_connection=true"
$doc.Save($config)
# attach mdf to local instance
$bakFile = join-path $startPath "sample-data\AdventureWorks.bak"
$mdfFile = join-path $startPath "sample-data\AdventureWorks.mdf"
$ldfFile = join-path $startPath "sample-data\AdventureWorks.ldf"
sqlcmd -S "$sqlInstance" -Q "RESTORE DATABASE AdventureWorks FROM DISK = '$bakFile' WITH MOVE 'AdventureWorksLT2008_Data' TO '$mdfFile', MOVE 'AdventureWorksLT2008_Log' TO '$ldfFile' ,REPLACE"
after_test:
- cmd: ECHO nuget pack src\ShowPlanParser\ShowPlanParser.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"
- cmd: nuget pack src\ShowPlanParser\ShowPlanParser.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"
- cmd: appveyor PushArtifact "ShowPlanParser.%GitVersion_NuGetVersion%.nupkg"
- cmd: ECHO nuget pack src\ShowPlanParser.EntityFramework6\ShowPlanParser.EntityFramework6.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"
- cmd: nuget pack src\ShowPlanParser.EntityFramework6\ShowPlanParser.EntityFramework6.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"
- cmd: appveyor PushArtifact "ShowPlanParser.EntityFramework6.%GitVersion_NuGetVersion%.nupkg"