-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from camalot/develop
merge develop -> master
- Loading branch information
Showing
124 changed files
with
3,149 additions
and
3,219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
## THIS IS HERE BECAUSE THE 'BEFORE-DEPLOYMENT' DOESNT WANT TO RUN UNLESS ONE OF THE DEPLOYMENTS EVALUATES TO TRUE | ||
## AND IT IS PISSING ME OFF | ||
|
||
$commitMessageRegex = "^\[deploy\:(pre-release|draft|release)\]$"; | ||
|
||
|
||
# read the publishChangelog file | ||
if(-not $env:CI_RELEASE_DESCRIPTION) { | ||
$env:CI_RELEASE_DESCRIPTION = (Get-Content -Path ".\.build\publishChangelog.txt" -Raw); | ||
} | ||
|
||
# Must come from master branch. | ||
# Must not have a PULL Request Number | ||
# Must match regex | ||
if ( $env:APPVEYOR_REPO_BRANCH -eq "master" ) { | ||
# Any commit to master will be deployed!!!! | ||
$env:CI_DEPLOY_NUGET = $true; | ||
$env:CI_DEPLOY_GITHUB = $true; | ||
$env:CI_DEPLOY_FTP = $false; | ||
$env:CI_DEPLOY_WebHook = $true; | ||
$env:CI_DEPLOY_WebDeploy = $true; | ||
$env:CI_DEPLOY_CodePlex = $false; | ||
$env:CI_DEPLOY_WEBAPI_RELEASE = $false; | ||
$env:CI_DEPLOY_PUSHBULLET = $false; | ||
$env:CI_DEPLOY = $true; | ||
} elseif ( $env:APPVEYOR_REPO_BRANCH -eq "develop" ) { | ||
$env:CI_DEPLOY_NUGET = $true; | ||
$env:CI_DEPLOY_GITHUB_PRE = $true; | ||
$env:CI_DEPLOY_GITHUB = $false; | ||
$env:CI_DEPLOY_FTP = $false; | ||
$env:CI_DEPLOY_WebHook = $false; | ||
$env:CI_DEPLOY_WebDeploy = $false; | ||
$env:CI_DEPLOY_CodePlex = $false; | ||
$env:CI_DEPLOY_WEBAPI_RELEASE = $false; | ||
$env:CI_DEPLOY_PUSHBULLET = $false; | ||
$env:CI_DEPLOY = $false; | ||
} else { | ||
$env:CI_DEPLOY_NUGET = $false; | ||
$env:CI_DEPLOY_GITHUB_PRE = $false; | ||
$env:CI_DEPLOY_GITHUB = $false; | ||
$env:CI_DEPLOY_FTP = $false; | ||
$env:CI_DEPLOY_WebHook = $false; | ||
$env:CI_DEPLOY_WebDeploy = $false; | ||
$env:CI_DEPLOY_CodePlex = $false; | ||
$env:CI_DEPLOY_WEBAPI_RELEASE = $false; | ||
$env:CI_DEPLOY_PUSHBULLET = $false; | ||
$env:CI_DEPLOY = $false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,87 @@ | ||
Import-Module "$env:APPVEYOR_BUILD_FOLDER\.appveyor\modules\Invoke-MsBuild.psm1"; | ||
Import-Module "$env:APPVEYOR_BUILD_FOLDER\.appveyor\modules\Send-PushbulletMessage.psm1"; | ||
#Import-Module "$env:APPVEYOR_BUILD_FOLDER\.appveyor\modules\Invoke-MsBuild.psm1"; | ||
#Import-Module "$env:APPVEYOR_BUILD_FOLDER\.appveyor\modules\Send-PushbulletMessage.psm1"; | ||
|
||
function Publish-Release { | ||
Param ( | ||
[Parameter(Mandatory=$true)] | ||
[string] $HostName | ||
) | ||
$appId = $env:CI_PUBLISHAPPID; | ||
$appKey = $env:CI_PUBLISHKEY; | ||
#function Publish-Release { | ||
# Param ( | ||
# [Parameter(Mandatory=$true)] | ||
# [string] $HostName | ||
# ) | ||
# $appId = $env:CI_PUBLISHAPPID; | ||
# $appKey = $env:CI_PUBLISHKEY; | ||
|
||
|
||
$url = "http://$HostName/api/update/create/"; | ||
$headers = @{}; | ||
$headers["Authentication-Token"] = $appKey; | ||
$headers["Application-Identifier"] = $appId; | ||
# $url = "http://$HostName/api/update/create/"; | ||
# $headers = @{}; | ||
# $headers["Authentication-Token"] = $appKey; | ||
# $headers["Application-Identifier"] = $appId; | ||
|
||
if(Test-Path -Path "$env:APPVEYOR_BUILD_FOLDER\.build\publishchangelog.txt") { | ||
# read the publish text file | ||
$publishNotes = (Get-Content -Path "$env:APPVEYOR_BUILD_FOLDER\.build\publishchangelog.txt") | Out-String; | ||
} | ||
# if(Test-Path -Path "$env:APPVEYOR_BUILD_FOLDER\.build\publishchangelog.txt") { | ||
# # read the publish text file | ||
# $publishNotes = (Get-Content -Path "$env:APPVEYOR_BUILD_FOLDER\.build\publishchangelog.txt") | Out-String; | ||
# } | ||
|
||
|
||
$post = @{ | ||
Id = $env:CP_RELEASE_ID; | ||
Version = $env:CI_BUILD_VERSION; | ||
Description = $publishNotes; | ||
Name = $env:CP_RELEASE_NAME; | ||
Url = "http://$env:CP_RELEASE_PROJECT.codeplex.com/releases/view/$env:CP_RELEASE_ID"; | ||
}; | ||
$contentType = "application/x-www-form-urlencoded"; | ||
$method = "POST"; | ||
# $post = @{ | ||
# Id = $env:CP_RELEASE_ID; | ||
# Version = $env:CI_BUILD_VERSION; | ||
# Description = $publishNotes; | ||
# Name = $env:CP_RELEASE_NAME; | ||
# Url = "http://$env:CP_RELEASE_PROJECT.codeplex.com/releases/view/$env:CP_RELEASE_ID"; | ||
# }; | ||
# $contentType = "application/x-www-form-urlencoded"; | ||
# $method = "POST"; | ||
|
||
$response = Invoke-WebRequest -Uri $url -Method $method -Headers $headers -TimeoutSec 120 -Body $post -ContentType $contentType -UserAgent "AppVeyor Build Agent"; | ||
# $response = Invoke-WebRequest -Uri $url -Method $method -Headers $headers -TimeoutSec 120 -Body $post -ContentType $contentType -UserAgent "AppVeyor Build Agent"; | ||
|
||
return $response; | ||
} | ||
# return $response; | ||
#} | ||
|
||
# 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 Black "Skip `"CodePlex`" deployment as environment variable has not matched (`"CI_DEPLOY_CODEPLEX`" is `"$false`", should be `"$true`")"; | ||
} | ||
#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 Black "Skip `"CodePlex`" deployment as environment variable has not matched (`"CI_DEPLOY_CODEPLEX`" is `"$false`", should be `"$true`")"; | ||
#} | ||
|
||
# publish release | ||
if( $env:CI_DEPLOY_WEBAPI_RELEASE -eq $true -and $env:Platform -eq "x86" ) { | ||
# this only gets called for the x86 platform so it is called once, and because the env:vars may not exist for x64 | ||
if( !$env:CP_RELEASE_NAME -or !$env:CP_RELEASE_ID -or !$env:CP_RELEASE_URL ) { | ||
Write-Host -BackgroundColor Red -ForegroundColor White "Unable to read the required values to create the release"; | ||
$host.SetShouldExit(500); | ||
return; | ||
} | ||
@($env:DevelopmentApiDomain,$env:ProductionApiDomain) | foreach { | ||
$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; | ||
$host.SetShouldExit($resp.StatusCode); | ||
return; | ||
} | ||
#if( $env:CI_DEPLOY_WEBAPI_RELEASE -eq $true -and $env:Platform -eq "x86" ) { | ||
# # this only gets called for the x86 platform so it is called once, and because the env:vars may not exist for x64 | ||
# if( !$env:CP_RELEASE_NAME -or !$env:CP_RELEASE_ID -or !$env:CP_RELEASE_URL ) { | ||
# Write-Host -BackgroundColor Red -ForegroundColor White "Unable to read the required values to create the release"; | ||
# $host.SetShouldExit(500); | ||
# return; | ||
# } | ||
# @($env:DevelopmentApiDomain,$env:ProductionApiDomain) | foreach { | ||
# $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; | ||
# $host.SetShouldExit($resp.StatusCode); | ||
# return; | ||
# } | ||
|
||
} | ||
} else { | ||
Write-Host -BackgroundColor Yellow -ForegroundColor Black "Skip `"WebApiRelease`" deployment as environment variable has not matched (`"CI_DEPLOY_CODEPLEX`" is `"$false`", should be `"$true`")"; | ||
} | ||
# } | ||
#} else { | ||
# 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:PUSHBULLET_API_TOKEN.Split(",") | foreach { | ||
$pbtoken = $_; | ||
try { | ||
# Send a pushbullet message if there is an api token available | ||
Send-PushbulletMessage -apiKey $pbtoken -Type Message -Title "[Build] Managed.ADB $env:Platform v$env:CI_BUILD_VERSION Build Finished" -msg ("Build completed at $timestamp UTC"); | ||
#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:PUSHBULLET_API_TOKEN.Split(",") | foreach { | ||
# $pbtoken = $_; | ||
# try { | ||
# # Send a pushbullet message if there is an api token available | ||
# Send-PushbulletMessage -apiKey $pbtoken -Type Message -Title "[Build] Managed.ADB $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] Managed.ADB 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]"); | ||
} | ||
} | ||
} | ||
# if( $env:Platform -eq "x64" -and $env:CI_DEPLOY_PUSHBULLET -eq $true) { | ||
# Send-PushbulletMessage -apiKey $pbtoken -Type Message -Title "[Deploy] Managed.ADB 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]"); | ||
# } | ||
# } | ||
#} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +0,0 @@ | ||
<# | ||
# | ||
# | ||
#> | ||
|
||
$commitMessageRegex = "^\[deploy\:(pre-release|draft|release)\]$"; | ||
|
||
|
||
# Must come from master branch. | ||
# Must not have a PULL Request Number | ||
# Must match regex | ||
if ( ($env:APPVEYOR_REPO_BRANCH -eq "master") -and ($env:APPVEYOR_REPO_COMMIT_MESSAGE -match $commitMessageRegex) ) { | ||
$env:CI_DEPLOY_NUGET = $true; | ||
$env:CI_DEPLOY_GITHUB = $true; | ||
$env:CI_DEPLOY_FTP = $false; | ||
$env:CI_DEPLOY_WebHook = $true; | ||
$env:CI_DEPLOY_WebDeploy = $true; | ||
$env:CI_DEPLOY_CodePlex = $false; | ||
$env:CI_DEPLOY_WEBAPI_RELEASE = $false; | ||
$env:CI_DEPLOY_PUSHBULLET = $true; | ||
$env:CI_DEPLOY = $true; | ||
} else { | ||
# Do not assign a release number or deploy | ||
$env:CI_DEPLOY_NUGET = $false; | ||
$env:CI_DEPLOY_GITHUB = $false; | ||
$env:CI_DEPLOY_FTP = $false; | ||
$env:CI_DEPLOY_WebHook = $false; | ||
$env:CI_DEPLOY_WebDeploy = $false; | ||
$env:CI_DEPLOY_CodePlex = $false; | ||
$env:CI_DEPLOY_WEBAPI_RELEASE = $false; | ||
$env:CI_DEPLOY_PUSHBULLET = $false; | ||
$env:CI_DEPLOY = $false; | ||
} | ||
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
choco install -y nuget.commandline --version 3.3.0; | ||
& choco install -y nuget.commandline -version 3.3.0; | ||
|
||
$env:PATH = "C:\ProgramData\chocolatey\lib\NuGet.CommandLine\tools;$env:PATH"; | ||
$env:PATH = "C:\ProgramData\chocolatey\lib\NuGet.CommandLine\tools\;C:\Python34;C:\Python34\Scripts\;$env:PATH"; | ||
|
||
& python -m pip install --upgrade pip; | ||
|
||
pip install codecov; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# /noshadow /nologo /notrait category=IntegrationTest | ||
|
||
& "${ENV:APPVEYOR_BUILD_FOLDER}\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe" -log:All -register:user -target:`"${ENV:APPVEYOR_BUILD_FOLDER}\packages\xunit.runner.console.2.1.0\tools\xunit.console.x86.exe`" -filter:`"+[Managed.Adb]* -[Managed.Adb]Managed.Adb.Properties.*`" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:`"${ENV:APPVEYOR_BUILD_FOLDER}\managed.adb.coverage.xml`" -targetargs:`"`\`"${ENV:APPVEYOR_BUILD_FOLDER}\Managed.Adb.Tests\bin\x86\Debug\Managed.Adb.Tests.dll`\`" -verbose -noshadow `"; | ||
|
||
codecov -f `"${ENV:APPVEYOR_BUILD_FOLDER}\managed.adb.coverage.xml`" -X gcov; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.