Skip to content

Commit 7c83499

Browse files
committed
Merge branch 'develop'
2 parents 230a8b9 + c548f55 commit 7c83499

File tree

1,470 files changed

+117606
-159707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,470 files changed

+117606
-159707
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ __vm/
1212
HA4IoT.opensdf
1313
HA4IoT.sdf
1414
*.VC.opendb
15+
HA4IoT.VC.db

Diff for: App/DeployApps.ps1

+33-5
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ function Deploy
2929
}
3030

3131
function SelectIP
32-
{
33-
Write-Host "Select IP of target:";
32+
{
33+
Write-Host "Select IP of controller:";
3434
Write-Host "0 - 192.168.1.15";
3535
Write-Host "1 - 192.168.1.16";
3636
Write-Host "2 - minwinpc";
3737
Write-Host "----------------";
3838
Write-Host "c - <custom>";
3939

40-
$choice = Read-Host
40+
$choice = [Console]::ReadKey($true).KeyChar;
4141

4242
switch($choice)
4343
{
@@ -61,10 +61,10 @@ function Confirm()
6161

6262
if ($key -eq "y")
6363
{
64-
return 1;
64+
return $true;
6565
}
6666

67-
return 0;
67+
return $false;
6868
}
6969

7070
function IncreaseVersion
@@ -79,9 +79,31 @@ function IncreaseVersion
7979
#Set-Content - $versionFile
8080
}
8181

82+
function GetIsStaging
83+
{
84+
Write-Host "Select slot:";
85+
Write-Host "0 - Live";
86+
Write-Host "1 - Staging";
87+
88+
$choice = [Console]::ReadKey($true).KeyChar;
89+
90+
if ($choice -eq 0)
91+
{
92+
return $false;
93+
}
94+
95+
return $true;
96+
}
97+
8298
## Start...
8399
Set-Location $PSScriptRoot
100+
101+
Write-Host "----------------------------------";
102+
Write-Host "--- HA4IoT App deployment tool ---";
103+
Write-Host "----------------------------------";
104+
84105
$ip = SelectIP
106+
$isStaging = GetIsStaging
85107

86108
$repeat = 1
87109
while($repeat)
@@ -97,9 +119,15 @@ while($repeat)
97119
Write-Host "Found package: $package";
98120

99121
$clearRemoteDirectory = Confirm("Clear remote directory (y/n)?")
122+
100123
$sourceDir = ".\HA4IoT.WebApp"
101124
$remoteDir = "$package\LocalState\App"
102125

126+
if ($isStaging)
127+
{
128+
$remoteDir = "$remoteDir\STAGING";
129+
}
130+
103131
#IncreaseVersion -Package "$remoteDir"
104132

105133
Deploy -Source ".\HA4IoT.WebApp" -Target "$remoteDir" -Clear $clearRemoteDirectory

0 commit comments

Comments
 (0)