mirror of
https://github.com/buildbot/buildbot.git
synced 2021-05-20 10:47:20 +03:00
common: Raise exception on duplicate asset upload to github
This commit is contained in:
@@ -36,6 +36,10 @@ def main():
|
||||
assets = assets.json()
|
||||
os.makedirs('dist', exist_ok=True)
|
||||
for url in (a['browser_download_url'] for a in assets):
|
||||
if 'gitarchive' in url:
|
||||
raise Exception('The git archive has already been uploaded. Are you trying to fix '
|
||||
'broken upload? If this is the case, delete the asset in the GitHub '
|
||||
'UI and retry this command')
|
||||
if url.endswith(".whl") or url.endswith(".tar.gz"):
|
||||
fn = os.path.join('dist', url.split('/')[-1])
|
||||
download(s, url, fn)
|
||||
|
||||
Reference in New Issue
Block a user