-
Notifications
You must be signed in to change notification settings - Fork 38
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 #58 from GitTools/release/0.3.0
Release/0.3.0
- Loading branch information
Showing
78 changed files
with
1,013 additions
and
1,206 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
# The creation of this build script (and associated files) was only possible using the | ||
# work that was done on the BoxStarter Project on GitHub: | ||
# http://boxstarter.codeplex.com/ | ||
# Big thanks to Matt Wrock (@mwrockx} for creating this project, thanks! | ||
|
||
param ( | ||
[string]$Action="default", | ||
[string]$Config="Debug", | ||
[switch]$Help | ||
) | ||
|
||
$here = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
$psakePath = Join-Path $here -Child "..\Tools\psake\psake.psm1"; | ||
Import-Module $psakePath; | ||
|
||
if($Help){ | ||
try { | ||
Get-Help "$($MyInvocation.MyCommand.Definition)" -full | Out-Host -paging | ||
Write-Output "Available build tasks:" | ||
invoke-psake "$here/default.ps1" -nologo -docs | Out-Host -paging | ||
} catch {} | ||
|
||
return | ||
} | ||
|
||
# The creation of this build script (and associated files) was only possible using the | ||
# work that was done on the BoxStarter Project on GitHub: | ||
# http://boxstarter.codeplex.com/ | ||
# Big thanks to Matt Wrock (@mwrockx} for creating this project, thanks! | ||
|
||
param ( | ||
[string]$Action="default", | ||
[string]$Config="Debug", | ||
[switch]$Help | ||
) | ||
|
||
$here = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
$psakePath = Join-Path $here -Child "..\Tools\psake\psake.psm1"; | ||
Import-Module $psakePath; | ||
|
||
if($Help){ | ||
try { | ||
Get-Help "$($MyInvocation.MyCommand.Definition)" -full | Out-Host -paging | ||
Write-Output "Available build tasks:" | ||
invoke-psake "$here/default.ps1" -nologo -docs | Out-Host -paging | ||
} catch {} | ||
|
||
return | ||
} | ||
|
||
if(Test-Path -Path env:\APPVEYOR) { | ||
if ($env:APPVEYOR_SCHEDULED_BUILD -eq "True") { | ||
Write-Output "Since this is a scheduled build, simply run a build, with deployment of Coverity Artifacts, but no other deployment" | ||
invoke-psake "$here/default.ps1" -task RebuildSolution -properties @{ 'config'='Release'; } | ||
} elseif($env:APPVEYOR_REPO_BRANCH -eq "develop" -And $env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null) { | ||
Write-Output "Since we are on develop branch with no pull request number, we are ready to deploy to Develop MyGet Feed" | ||
invoke-psake "$here/default.ps1" -task DeployDevelopSolutionToMyGet -properties @{ 'config'='Release'; } | ||
} elseif($env:APPVEYOR_REPO_BRANCH -eq "develop" -And $env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null) { | ||
Write-Output "Since we are on develop branch with a pull request number, we are just going to package the solution, with no deployment" | ||
invoke-psake "$here/default.ps1" -task InspectCodeForProblems -properties @{ 'config'='Release'; } | ||
} elseif($env:APPVEYOR_REPO_BRANCH -eq "master" -And $env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -And $env:APPVEYOR_REPO_TAG -eq $false) { | ||
Write-Output "Since we are on master branch with no pull request number, and no tag applied, we are ready to deploy to Master MyGet Feed" | ||
invoke-psake "$here/default.ps1" -task DeployMasterSolutionToMyGet -properties @{ 'config'='Release'; } | ||
} elseif($env:APPVEYOR_REPO_BRANCH -eq "master" -And $env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null -And $env:APPVEYOR_REPO_TAG -eq $false) { | ||
Write-Output "Since we are on master branch with a pull request number, and no tag applied, we are just going to package the solution, with no deployment" | ||
invoke-psake "$here/default.ps1" -task InspectCodeForProblems -properties @{ 'config'='Release'; } | ||
} elseif($env:APPVEYOR_REPO_BRANCH -eq "master" -And $env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -And $env:APPVEYOR_REPO_TAG -eq $true) { | ||
Write-Output "Since we are on master branch with no pull request number, and a tag has been applied, we are ready to deploy Chocolatey.org" | ||
invoke-psake "$here/default.ps1" -task DeploySolutionToChocolatey -properties @{ 'config'='Release'; } | ||
} | ||
} else { | ||
invoke-psake "$here/default.ps1" -task $Action -properties @{ 'config'=$Config; } | ||
} | ||
|
||
# If for some reason, the above if statement doesn't actually invoke-psake, the $psake.build_success will be false | ||
# so it will exit with a code of 1 below, which will fail the build. | ||
if ($psake.build_success -eq $false) { | ||
exit 1 | ||
} else { | ||
exit 0 | ||
} elseif($env:APPVEYOR_REPO_BRANCH -eq "develop" -And $env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null) { | ||
Write-Output "Since we are on develop branch with no pull request number, we are ready to deploy to Develop MyGet Feed" | ||
invoke-psake "$here/default.ps1" -task DeployDevelopSolutionToMyGet -properties @{ 'config'='Release'; } | ||
} elseif($env:APPVEYOR_REPO_BRANCH -eq "develop" -And $env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null) { | ||
Write-Output "Since we are on develop branch with a pull request number, we are just going to package the solution, with no deployment" | ||
invoke-psake "$here/default.ps1" -task InspectCodeForProblems -properties @{ 'config'='Release'; } | ||
} elseif($env:APPVEYOR_REPO_BRANCH -eq "master" -And $env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -And $env:APPVEYOR_REPO_TAG -eq $false) { | ||
Write-Output "Since we are on master branch with no pull request number, and no tag applied, we are ready to deploy to Master MyGet Feed" | ||
invoke-psake "$here/default.ps1" -task DeployMasterSolutionToMyGet -properties @{ 'config'='Release'; } | ||
} elseif($env:APPVEYOR_REPO_BRANCH -eq "master" -And $env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null -And $env:APPVEYOR_REPO_TAG -eq $false) { | ||
Write-Output "Since we are on master branch with a pull request number, and no tag applied, we are just going to package the solution, with no deployment" | ||
invoke-psake "$here/default.ps1" -task InspectCodeForProblems -properties @{ 'config'='Release'; } | ||
} elseif($env:APPVEYOR_REPO_BRANCH -eq "master" -And $env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -And $env:APPVEYOR_REPO_TAG -eq $true) { | ||
Write-Output "Since we are on master branch with no pull request number, and a tag has been applied, we are ready to deploy Chocolatey.org" | ||
invoke-psake "$here/default.ps1" -task DeploySolutionToChocolatey -properties @{ 'config'='Release'; } | ||
} | ||
} else { | ||
invoke-psake "$here/default.ps1" -task $Action -properties @{ 'config'=$Config; } | ||
} | ||
|
||
# If for some reason, the above if statement doesn't actually invoke-psake, the $psake.build_success will be false | ||
# so it will exit with a code of 1 below, which will fail the build. | ||
if ($psake.build_success -eq $false) { | ||
exit 1 | ||
} else { | ||
exit 0 | ||
} |
Oops, something went wrong.