This repository has been archived by the owner on Jul 29, 2020. It is now read-only.
forked from jakubgarfield/Bonobo-Git-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
74 lines (49 loc) · 3.15 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '{build}'
configuration: Release
platform: Any CPU
cache:
- packages -> **\packages.config
assembly_info:
patch: true
file: AssemblyInfo.cs
assembly_version: "6.2.1.{build}-$(APPVEYOR_BUILD_ID)-$(APPVEYOR_REPO_BRANCH)-$(APPVEYOR_REPO_COMMIT)"
assembly_file_version: "6.2.1.{build}-$(APPVEYOR_BUILD_ID)-$(APPVEYOR_REPO_BRANCH)-$(APPVEYOR_REPO_COMMIT)"
install:
- set IIS_USER_HOME=%USERPROFILE%\Documents\IISExpress
- md %IIS_USER_HOME%\Logs
- md %IIS_USER_HOME%\TraceLogFile
- md %IIS_USER_HOME%\config
- ps: >-
cp c:\projects\Bonobo-Git-Server\Bonobo.Git.Server.Test\iissetup\applicationhost.config $env:IIS_USER_HOME\config\
cp c:\projects\Bonobo-Git-Server\Bonobo.Git.Server.Test\iissetup\redirection.config $env:IIS_USER_HOME\config\
cp c:\projects\Bonobo-Git-Server\Bonobo.Git.Server.Test\iissetup\aspnet.config $env:IIS_USER_HOME\config\
& "C:\Program Files (x86)\IIS Express\appcmd.exe" set config -section:system.applicationHost/sites /+"[name='Bonobo.Git.Server-Site',id='2'].bindings.[protocol='http',bindingInformation='*:5000:localhost']" /commit:apphost
& "C:\Program Files (x86)\IIS Express\appcmd.exe" set config -section:system.applicationHost/sites /+"[name='Bonobo.Git.Server-Site',id='2'].[path='/',applicationPool='Clr4IntegratedAppPool']" /commit:apphost
& "C:\Program Files (x86)\IIS Express\appcmd.exe" set config -section:system.applicationHost/sites /+"[name='Bonobo.Git.Server-Site',id='2'].[path='/'].[path='/',physicalPath='C:\projects\Bonobo-Git-Server\Bonobo.Git.Server']" /commit:apphost
before_build:
- ps: >-
function Patch-Xml { param([string] $filePath, [string] $strToReplace, [string] $replacement)
(Get-Content $filePath -Encoding utf8) | Foreach-Object { $_ -replace $strToReplace,$replacement } | Out-File $filePath -Encoding utf8
}
nuget restore
Write-Host "Patch Release.pubxml"
$pubxml = 'Bonobo.Git.Server\Properties\PublishProfiles\Release.pubxml'
Patch-Xml $pubxml '<EnableUpdateable>True</EnableUpdateable>' '<EnableUpdateable>False</EnableUpdateable>'
Patch-Xml $pubxml '<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>' '<LaunchSiteAfterPublish>False</LaunchSiteAfterPublish>'
Patch-Xml $pubxml '<publishUrl>..\\..\\Bonobo_install\\Bonobo.Git.Server</publishUrl>' '<publishUrl>..\Bonobo_install\Bonobo.Git.Server</publishUrl>'
Write-Host "End Patch Release.pubxml"
build:
project: Bonobo.Git.Server.sln
parallel: true
verbosity: Minimal
after_build:
- ps: >-
Write-Host "Creating Packages"
msbuild Bonobo.Git.Server.sln /m:4 /p:Configuration=Release /p:Platform="Any CPU" /p:DeployOnBuild=true /p:PublishProfile=Release
Write-Host "End Creating Packages"
Write-Host "Create bonobo-git-server.zip"
Add-Type -assembly "system.io.compression.filesystem"
[io.compression.zipfile]::CreateFromDirectory('C:\projects\bonobo-git-server\Bonobo_install', "C:\projects\bonobo-git-server\bonobo-git-server-$env:APPVEYOR_BUILD_ID-$env:APPVEYOR_REPO_COMMIT.zip")
artifacts:
- path: bonobo-git-server-$(APPVEYOR_BUILD_ID)-$(APPVEYOR_REPO_COMMIT).zip
name: bonobo-git-server-$(APPVEYOR_BUILD_ID)-$(APPVEYOR_REPO_COMMIT).zip