Skip to content

Commit

Permalink
(GH-218) Force installation of latest Chocolatey
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Mar 1, 2015
1 parent 3c4d0ef commit 3461274
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions BuildScripts/default.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,14 @@ Task -Name __RemoveBuildArtifactsDirectory -Description $private -Action {
Task -Name __InstallChocolatey -Description $private -Action {
if(isChocolateyInstalled) {
Write-Host "Chocolatey already installed";
Write-Host "Updating to latest Chocolatey..."
$choco = Join-Path (Join-Path $script:chocolateyDir "chocolateyInstall") -ChildPath "chocolatey.cmd";

exec {
Invoke-Expression "$choco update chocolatey";
}

Write-Host "Latest Chocolatey installed."
} else {
try {
Write-Host "Chocolatey is not installed, installing Chocolatey...";
Expand All @@ -241,11 +249,11 @@ Task -Name __InstallChocolatey -Description $private -Action {
throw "Error installing Chocolatey"
}

Write-Host ("************ Install PSBuild Successful ************")
Write-Host ("************ Install Chocolatey Successful ************")
}
catch {
Write-Error $_
Write-Host ("************ Install PSBuild Failed ************")
Write-Host ("************ Install Chocolatey Failed ************")
}
}
}
Expand Down Expand Up @@ -592,7 +600,7 @@ Task -Name DeployDevelopPackageToMyGet -Description "Takes the packaged Chocolat
}
}

Task -Name DeployMasterSolutionToMyGet -Description "Takes the packaged Chocolatey package from master branch and deploys to MyGet.org" -Action {
Task -Name DeployMasterPackageToMyGet -Description "Takes the packaged Chocolatey package from master branch and deploys to MyGet.org" -Action {
$buildArtifactsDirectory = get-buildArtifactsDirectory;

try {
Expand Down

0 comments on commit 3461274

Please sign in to comment.