From 90d4b357413419c6f412384bd2a07850bd7cb422 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Mon, 14 Aug 2017 17:34:57 +0200 Subject: [PATCH] Minimized the the release recreation race condition by writing the current sha to the comment section. --- .appveyor/prepareDeploy.ps1 | 6 +++--- appveyor.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.appveyor/prepareDeploy.ps1 b/.appveyor/prepareDeploy.ps1 index 7dd3db3b..5b443dd9 100644 --- a/.appveyor/prepareDeploy.ps1 +++ b/.appveyor/prepareDeploy.ps1 @@ -35,9 +35,9 @@ if(!$releaseId){ Return; } -if($result.assets.length <= 1){ - # The other build already recreated the release - Write-Host "The other build already recreated the release" +if($result.body -contains $Env:APPVEYOR_REPO_COMMIT){ + # An other build already recreated the release + Write-Host "An other build already recreated the release" Return; } diff --git a/appveyor.yml b/appveyor.yml index 3fc27076..09886aab 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -98,7 +98,7 @@ deploy: - provider: GitHub tag: $(APPVEYOR_REPO_TAG_NAME) release: Latest Nightly build - description: + description: $(APPVEYOR_REPO_COMMIT) auth_token: secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW artifact: ReleaseZip