Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
chkr1011 committed Apr 26, 2016
2 parents 230a8b9 + c548f55 commit 7c83499
Show file tree
Hide file tree
Showing 1,470 changed files with 117,606 additions and 159,707 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ __vm/
HA4IoT.opensdf
HA4IoT.sdf
*.VC.opendb
HA4IoT.VC.db
38 changes: 33 additions & 5 deletions App/DeployApps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ function Deploy
}

function SelectIP
{
Write-Host "Select IP of target:";
{
Write-Host "Select IP of controller:";
Write-Host "0 - 192.168.1.15";
Write-Host "1 - 192.168.1.16";
Write-Host "2 - minwinpc";
Write-Host "----------------";
Write-Host "c - <custom>";

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

switch($choice)
{
Expand All @@ -61,10 +61,10 @@ function Confirm()

if ($key -eq "y")
{
return 1;
return $true;
}

return 0;
return $false;
}

function IncreaseVersion
Expand All @@ -79,9 +79,31 @@ function IncreaseVersion
#Set-Content - $versionFile
}

function GetIsStaging
{
Write-Host "Select slot:";
Write-Host "0 - Live";
Write-Host "1 - Staging";

$choice = [Console]::ReadKey($true).KeyChar;

if ($choice -eq 0)
{
return $false;
}

return $true;
}

## Start...
Set-Location $PSScriptRoot

Write-Host "----------------------------------";
Write-Host "--- HA4IoT App deployment tool ---";
Write-Host "----------------------------------";

$ip = SelectIP
$isStaging = GetIsStaging

$repeat = 1
while($repeat)
Expand All @@ -97,9 +119,15 @@ while($repeat)
Write-Host "Found package: $package";

$clearRemoteDirectory = Confirm("Clear remote directory (y/n)?")

$sourceDir = ".\HA4IoT.WebApp"
$remoteDir = "$package\LocalState\App"

if ($isStaging)
{
$remoteDir = "$remoteDir\STAGING";
}

#IncreaseVersion -Package "$remoteDir"

Deploy -Source ".\HA4IoT.WebApp" -Target "$remoteDir" -Clear $clearRemoteDirectory
Expand Down
Loading

0 comments on commit 7c83499

Please sign in to comment.