Skip to content

Instantly share code, notes, and snippets.

@ctolkien
Created May 8, 2017 10:22
Show Gist options
  • Save ctolkien/69c90fe6af1f6491d7829048e6fd0918 to your computer and use it in GitHub Desktop.
Save ctolkien/69c90fe6af1f6491d7829048e6fd0918 to your computer and use it in GitHub Desktop.
AppVeyorReleaseTagging
if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:APPVEYOR_REPO_TAG_NAME -match "^v\d+\.\d+\.\d+(-(?<prerelease>[\w\d]+))?$")
{
$env:TaggedForRelease = $true
$env:TaggedForPreRelease = $matches.prerelease -ne $null
$relName = if ($env:TaggedForPreRelease) { "PreRelease" } else { "Release" }
Add-AppveyorMessage "Tagged For $($relName): $($env:APPVEYOR_REPO_TAG_NAME)" -details $env:APPVEYOR_REPO_COMMIT
Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME".Substring(1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment