Skip to content

Commit

Permalink
Fixing uploader again
Browse files Browse the repository at this point in the history
  • Loading branch information
ayende committed Dec 29, 2009
1 parent 03cfc55 commit d18b7c5
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions default.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ properties {
$tools_dir = "$base_dir\Tools"
$release_dir = "$base_dir\Release"
$uploadCategory = "Rhino-Mocks"
$uploadScript = "C:\Builds\Upload\PublishBuild.build"
$uploader = "..\Uploader\S3Uploader.exe"
}

include .\psake_ext.ps1
Expand Down Expand Up @@ -116,16 +116,22 @@ task Release -depends Test, Merge {
}
}

task Upload -depend Release {
if (Test-Path $uploadScript ) {
$log = git log -n 1 --oneline
msbuild $uploadScript /p:Category=$uploadCategory "/p:Comment=$log" "/p:File=$release_dir\Rhino.Mocks-$humanReadableversion-Build-$env:ccnetnumericlabel.zip"

task Upload -depends Release {
Write-Host "Starting upload"
if (Test-Path $uploader) {
$log = $env:push_msg
if($log -eq $null -or $log.Length -eq 0) {
$log = git log -n 1 --oneline
}
&$uploader "$global:uploadCategory" "$release_dir\Rhino.Mocks-$humanReadableversion-Build-$env:ccnetnumericlabel.zip" "$log"

if ($lastExitCode -ne 0) {
write-host "Failed to upload to S3: $lastExitCode"
throw "Error: Failed to publish build"
}
}
else {
Write-Host "could not find upload script $uploadScript, skipping upload"
}
}
}

0 comments on commit d18b7c5

Please sign in to comment.