Don't delete old master branch build artifacts

This commit is contained in:
Oliver Hamlet
2016-09-26 21:14:47 +01:00
parent 9eb9c1997c
commit 05956ccc26
+8 -2
View File
@@ -20,8 +20,14 @@ $packages = @(
'LOOT_API'
'metadata-validator'
)
# The GitHub API's protected branches API is currently in preview, so hardcode
# the branches for now.
$protectedBranches = @(
'dev'
'master'
)
if ($currentBranch -ne "dev") {
if (!($protectedBranches.Contains($currentBranch))) {
exit
}
@@ -36,7 +42,7 @@ foreach($package in $packages) {
foreach ($version in $versions) {
if ($currentCommitId -eq (Get-HashFromBintrayVersion $version)) {
$versionBranch = Get-BranchFromBintrayVersion $version
if ($versionBranch -ne "dev") {
if (!($protectedBranches.Contains($versionBranch))) {
$matchingBranches += $versionBranch
}
}