Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Commit d69979d

Browse files
committed
fix: skip missing artifacts in pre-release
1 parent 3c79d61 commit d69979d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pre-release-steps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ def download_and_write(filename):
3737
url = 'https://github.com/vrelease/vrelease/releases/download/v{}/{}'.format(VERSION, filename)
3838

3939
req = requests.get(url, stream=True, timeout=30)
40+
if req.status_code == 404:
41+
log('missing artifact: ' + filename)
42+
return None
4043
req.raise_for_status()
4144
with tempfile.NamedTemporaryFile(delete=False, dir=dirname(dest_path)) as tmp_file:
4245
for chunk in req.iter_content(chunk_size=8192):
@@ -73,6 +76,9 @@ def main():
7376
'windows.exe',
7477
]
7578
]
79+
files = [file for file in files if file]
80+
if not files:
81+
raise RuntimeError('no artifacts downloaded')
7682

7783
log('calculating hashes')
7884
shasum = []

0 commit comments

Comments
 (0)