Skip to content

Commit

Permalink
Merge pull request #58 from GitTools/release/0.3.0
Browse files Browse the repository at this point in the history
Release/0.3.0
  • Loading branch information
gep13 committed Jul 10, 2015
2 parents 0a62a53 + 18f6bdb commit 10e7be5
Show file tree
Hide file tree
Showing 78 changed files with 1,013 additions and 1,206 deletions.
102 changes: 51 additions & 51 deletions BuildScripts/build.ps1
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
}
Loading

0 comments on commit 10e7be5

Please sign in to comment.