-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-setup-dev.ps1
46 lines (39 loc) · 1.71 KB
/
app-setup-dev.ps1
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
########################################################################
### BOOTSTRAP. Copy this section into each application setup script ###
### to make sure required functions are available. ###
########################################################################
$pathOfThisScript = Split-Path $MyInvocation.MyCommand.Path -Parent
$parentFolderOfThisScript = $pathOfThisScript | Split-Path -Parent
$scriptsProject = 'Escc.WebApplicationSetupScripts'
$functionsPath = "$pathOfThisScript\..\$scriptsProject\functions.ps1"
if (Test-Path $functionsPath) {
Write-Host "Checking $scriptsProject is up-to-date"
Push-Location "$pathOfThisScript\..\$scriptsProject"
git pull origin master
Pop-Location
Write-Host
.$functionsPath
} else {
if ($env:GIT_ORIGIN_URL) {
$repoUrl = $env:GIT_ORIGIN_URL -f $scriptsProject
git clone $repoUrl "$pathOfThisScript\..\$scriptsProject"
}
else
{
Write-Warning '$scriptsProject project not found. Please set a GIT_ORIGIN_URL environment variable on your system so that it can be downloaded.
Example: C:\>set GIT_ORIGIN_URL=https://example-git-server.com/{0}"
{0} will be replaced with the name of the repository to download.'
Exit
}
}
########################################################################
### END BOOTSTRAP. #####################################################
########################################################################
$projectName = "Escc.Umbraco.HeatmapAnalytics"
EnableDotNet40InIIS
CreateApplicationPool $projectName
CreateWebsite $projectName "$pathOfThisScript\$projectName"
CreateHTTPSBinding $projectName "localhost"
RemoveHTTPBinding $projectName 80
Write-Host
Write-Host "Done." -ForegroundColor "Green"