Skip to content

Commit

Permalink
Toggle draft status from upload scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenegriffin committed Feb 27, 2018
1 parent a3f4d54 commit 9f03141
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Deploy/New-ReleaseUri.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ function New-ReleaseUri {
Version of the file.
.PARAMETER Release
Name of the release
.PARAMETER Draft
Create release as a draft
#>
[CmdletBinding()]
param
Expand All @@ -26,6 +28,8 @@ function New-ReleaseUri {
[string]$Version,
[Parameter(Mandatory=$True)]
[string]$Release
[Parameter(Mandatory=$True)]
[bool]$Draft
)
process
{
Expand All @@ -35,7 +39,7 @@ function New-ReleaseUri {
target_commitish = "master";
name = "$Release ($Version)";
body = $releaseNotes;
draft = $TRUE;
draft = $Draft;
prerelease = $FALSE;
}

Expand Down
2 changes: 1 addition & 1 deletion Deploy/Upload-ReleaseCI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you just want to run the MFCMAPI or MrMAPI, get the executables. If you want

Write-Host "Creating $gitHubRepository/$release"

$uploadUri = New-ReleaseUri -gitHubUsername $gitHubUsername -gitHubRepository $gitHubRepository -Version $version -Release $release
$uploadUri = New-ReleaseUri -gitHubUsername $gitHubUsername -gitHubRepository $gitHubRepository -Version $version -Release $release -Draft $false
Write-Host $uploadUri

Upload-ReleaseFile -Name "MFCMAPI 32 bit executable" -FileName "MFCMapi.exe" -Release $release -Sourcepath $indir -Version $version -UploadURI $uploadUri
Expand Down
2 changes: 1 addition & 1 deletion Deploy/Upload-ReleaseFull.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you just want to run the MFCMAPI or MrMAPI, get the executables. If you want

Write-Host "Creating $gitHubRepository/$release"

$uploadUri = New-ReleaseUri -gitHubUsername $gitHubUsername -gitHubRepository $gitHubRepository -Version $version -Release $release
$uploadUri = New-ReleaseUri -gitHubUsername $gitHubUsername -gitHubRepository $gitHubRepository -Version $version -Release $release -Draft $true
Write-Host $uploadUri

Upload-ReleaseFile -Name "MFCMAPI 32 bit executable" -FileName "MFCMapi.exe" -Release $release -Sourcepath $indir -Version $version -UploadURI $uploadUri
Expand Down

0 comments on commit 9f03141

Please sign in to comment.