From f53e6fbe339d4b745386b81c2f9f2a78d3109d61 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Mon, 14 Aug 2017 17:15:37 +0200 Subject: [PATCH] Prevent that the other build (x86/x64) deletes the release again (still have a little race condition here...) --- .appveyor/prepareDeploy.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.appveyor/prepareDeploy.ps1 b/.appveyor/prepareDeploy.ps1 index 99ee09e2..7dd3db3b 100644 --- a/.appveyor/prepareDeploy.ps1 +++ b/.appveyor/prepareDeploy.ps1 @@ -35,6 +35,12 @@ if(!$releaseId){ Return; } +if($result.assets.length <= 1){ + # The other build already recreated the release + Write-Host "The other build already recreated the release" + Return; +} + $deleteAssetParams = @{ Uri = "https://api.github.com/repos/Vocaluxe/Vocaluxe/releases/$releaseId"; Method = 'DELETE';