From e7b478ffa64ca875e92bc625b9f681b5be636bf4 Mon Sep 17 00:00:00 2001 From: Ryan Conrad Date: Mon, 28 Sep 2015 08:17:11 -0500 Subject: [PATCH] Updated the links in the readme. Changed to log the PS deployment when it doesn't run. --- .appveyor/appveyor.after-deployment.ps1 | 26 ++++++++++++++++++++----- appveyor.yml | 10 +++++++++- readme.md | 2 +- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/.appveyor/appveyor.after-deployment.ps1 b/.appveyor/appveyor.after-deployment.ps1 index 7eb00cc..1d829b3 100644 --- a/.appveyor/appveyor.after-deployment.ps1 +++ b/.appveyor/appveyor.after-deployment.ps1 @@ -39,6 +39,8 @@ function Publish-Release { # trigger the codeplex deployment script 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`")"; } # publish release @@ -60,10 +62,24 @@ 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`")"; } -if( $env:Platform -eq "x64" -and $env:CI_DEPLOY_PUSHBULLET -eq $true) { - Send-PushbulletMessage -apiKey $env:PUSHBULLET_API_TOKEN -Type Message -Title "Droid Explorer v$env:CI_BUILD_VERSION Deployed" -msg ("Deployment completed at " + (Get-Date -Format "MM/dd/yyyy hh:mm:ss")); -} elseif ( $env:CI_DEPLOY -eq $false ) { - Send-PushbulletMessage -apiKey $env:PUSHBULLET_API_TOKEN -Type Message -Title "Droid Explorer $env:Platform v$env:CI_BUILD_VERSION Build Finished" -msg ("Build completed at " + (Get-Date -Format "MM/dd/yyyy hh:mm:ss")); -} \ No newline at end of file +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 { + $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"); + + 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`")"; + } + } +} diff --git a/appveyor.yml b/appveyor.yml index c926dcd..db57218 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -75,4 +75,12 @@ deploy: branch: master CI_DEPLOY_FTP: True after_deploy: -- ps: .\.appveyor\appveyor.after-deployment.ps1 \ No newline at end of file +- ps: .\.appveyor\appveyor.after-deployment.ps1 +notifications: +- provider: Slack + auth_token: + secure: MnyJiz0W7R/XnTok/Giy/P7J0+rQDTvtfK+J1CEjfvWKWqGyX4zzxDo28PE6eIRdaQTgC1jzvu5kIriwWhepSg== + channel: droid-explorer + on_build_success: true + on_build_failure: true + on_build_status_changed: true \ No newline at end of file diff --git a/readme.md b/readme.md index 90b7286..ebe3c8c 100644 --- a/readme.md +++ b/readme.md @@ -33,7 +33,7 @@ I am now monitoring Questions over on [Android Enthusiasts][8] tagged with [[Dro -[1]: http://de.codeplex.com/releases +[1]: http://de.bit13.com/releases/go [2]: http://de.bit13.com [3]: http://i.imgur.com/AeF9O4q.png [4]: http://i.imgur.com/EMsfFVi.png