Skip to content

Commit

Permalink
release script in yml - script shouldn't be published
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Jul 24, 2019
1 parent c8a9f8b commit 128328a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 44 deletions.
43 changes: 0 additions & 43 deletions Source/build/Process-Release.ps1

This file was deleted.

43 changes: 42 additions & 1 deletion Source/build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,48 @@ stages:
runOnce:
deploy:
steps:
- powershell: Source/build/Process-Release.ps1
- powershell: |
try {
$artifactDirectory = Join-Path -Path $env:PIPELINE_WORKSPACE -ChildPath 'NuGet'
Write-Host "Currect working directory - $artifactDirectory"
$nupkg = Get-ChildItem -Path $artifactDirectory -Filter *.nupkg -Recurse | Select-Object -First 1
if($null -eq $nupkg)
{
Throw "No NuGet Package could be found in the current directory"
}
Write-Host "Package Name $($nupkg.Name)"
$nupkg.Name -match '^(.*?)\.((?:\.?[0-9]+){3,}(?:[-a-z]+)?)\.nupkg$'
$VersionName = $Matches[2]
$IsPreview = $VersionName -match '-pre$'
$ReleaseDisplayName = $VersionName
$artifacts = "$env:PIPELINE_WORKSPACE/Release"
if($null -eq $env:IS_PREVIEW)
{
Write-Output ("##vso[task.setvariable variable=IS_PREVIEW;]$IsPreview")
}
if($true -eq $IsPreview)
{
$baseVersion = $VersionName.Split('-')[0]
$ReleaseDisplayName = "$baseVersion - Preview"
}
Write-Host "Version Name - $VersionName"
Write-Host "Release Display Name - $ReleaseDisplayName"
Write-Host "DLL Artifacts - $artifacts"
Write-Output ("##vso[task.setvariable variable=VersionName;]$VersionName")
Write-Output ("##vso[task.setvariable variable=ReleaseDisplayName;]$ReleaseDisplayName")
Write-Output ("##vso[task.setvariable variable=DLLArtifactsPath;]$artifacts")
Write-Output ("##vso[task.setvariable variable=DLLArtifactsZip;]$artifacts.zip")
}
catch {
Write-Error $_
exit 1
}
displayName: Process Artifacts for Release
- task: ArchiveFiles@2
Expand Down

0 comments on commit 128328a

Please sign in to comment.