Skip to content

Commit

Permalink
what do you know... typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
camalot committed Sep 29, 2015
1 parent e7b478f commit 52df9d2
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .appveyor/appveyor.after-deployment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Publish-Release {
if( $env:CI_DEPLOY_CODEPLEX -eq $true ) {
Invoke-MsBuild -Path "$env:APPVEYOR_BUILD_FOLDER\.appveyor\DeployCodePlex.msbuild" -MsBuildParameters "/verbosity:detailed /p:CI_BUILD_VERSION=$env:CI_BUILD_VERSION /p:CI_BUILD_REVISION=$env:CI_BUILD_REVISION /p:CI_BUILD_MAJOR=$env:CI_BUILD_MAJOR /p:CI_BUILD_MINOR=$env:CI_BUILD_MINOR"
} else {
Write-Host -BackgroundColor Yellow -ForegroundColor White "Skip `"GitHub`" deployment as environment variable has not matched (`"CI_DEPLOY_CODEPLEX`" is `"$false`", should be `"$true`")";
Write-Host -BackgroundColor Yellow -ForegroundColor Black "Skip `"CodePlex`" deployment as environment variable has not matched (`"CI_DEPLOY_CODEPLEX`" is `"$false`", should be `"$true`")";
}

# publish release
Expand All @@ -53,7 +53,7 @@ if( $env:CI_DEPLOY_WEBAPI_RELEASE -eq $true -and $env:Platform -eq "x86" ) {
}
@($env:DevelopmentApiDomain,$env:ProductionApiDomain) | foreach {
$hostname = $_;
Write-Host "Publishing Release Information '$env:CP_RELEASE_NAME' to $hostname";
Write-Host "[WebApiRelease] Publishing Release Information '$env:CP_RELEASE_NAME' to $hostname";
$resp = Publish-Release -HostName $hostname;
if($resp.StatusCode -ne 200) {
Write-Host -BackgroundColor Red -ForegroundColor White $resp.StatusDescription;
Expand All @@ -63,23 +63,25 @@ if( $env:CI_DEPLOY_WEBAPI_RELEASE -eq $true -and $env:Platform -eq "x86" ) {

}
} else {
Write-Host -BackgroundColor Yellow -ForegroundColor Black "Skip `"CodePlex`" deployment as environment variable has not matched (`"CI_DEPLOY_CODEPLEX`" is `"$false`", should be `"$true`")";
Write-Host -BackgroundColor Yellow -ForegroundColor Black "Skip `"WebApiRelease`" deployment as environment variable has not matched (`"CI_DEPLOY_CODEPLEX`" is `"$false`", should be `"$true`")";
}

if($env:PUSHBULLET_API_TOKEN) {

$timestamp = (Get-Date).ToUniversalTime().ToString("MM/dd/yyyy hh:mm:ss");

# this allows for multiple tokens, just separate with a comma.
$env:PUSHPULLET_API_TOKEN.split(",") | foreach {
$env:PUSHBULLET_API_TOKEN.Split(",") | foreach {
$pbtoken = $_;
# Send a pushbullet message if there is an api token available
Send-PushbulletMessage -apiKey $pbtoken -Type Message -Title "[Build] Droid Explorer $env:Platform v$env:CI_BUILD_VERSION Build Finished" -msg ("Build completed at $timestamp UTC");
try {
# Send a pushbullet message if there is an api token available
Send-PushbulletMessage -apiKey $pbtoken -Type Message -Title "[Build] Droid Explorer $env:Platform v$env:CI_BUILD_VERSION Build Finished" -msg ("Build completed at $timestamp UTC");

if( $env:Platform -eq "x64" -and $env:CI_DEPLOY_PUSHBULLET -eq $true) {
Send-PushbulletMessage -apiKey $pbtoken -Type Message -Title "[Deploy] Droid Explorer v$env:CI_BUILD_VERSION Deployed" -msg ("Deployment completed at $timestamp UTC");
} else {
Write-Host -BackgroundColor Yellow -ForegroundColor Black "Skip `"PushBullet`" deployment as environment variable has not matched (`"CI_DEPLOY_PUSHBULLET`" is `"$false`", should be `"$true`" and `"Platform`" is `"$env:Platform`", should be `"x64`")";
if( $env:Platform -eq "x64" -and $env:CI_DEPLOY_PUSHBULLET -eq $true) {
Send-PushbulletMessage -apiKey $pbtoken -Type Message -Title "[Deploy] Droid Explorer v$env:CI_BUILD_VERSION Deployed" -msg ("Deployment completed at $timestamp UTC");
} else {
Write-Host -BackgroundColor Yellow -ForegroundColor Black "Skip `"PushBullet`" deployment as environment variable has not matched (`"CI_DEPLOY_PUSHBULLET`" is `"$false`", should be `"$true`" and `"Platform`" is `"$env:Platform`", should be `"x64`")";
}
} catch [Exeption] {
Write-Error ($_ -replace $pbtoken, "[`$env:PUSHBULLET_API_TOKEN]");
}
}
}

0 comments on commit 52df9d2

Please sign in to comment.