Philipp Hörist pushed to branch master at gajim / gajim
Commits:
8f049c69 by lovetox at 2022-03-28T21:24:48+02:00
ci: Create build folder
- - - - -
1 changed file:
- .ci/appveyor_build.py
Changes:
=====================================
.ci/appveyor_build.py
=====================================
@@ -85,27 +85,28 @@ def get_artifacts(build_id: str) -> None:
console.print('Build status:', build['status'])
+ build_folder = Path.cwd() / 'build'
+ build_folder.mkdir()
+
for job in build['jobs']:
- download_job_artifacts(job['jobId'])
+ download_job_artifacts(job['jobId'], build_folder)
console.print('All artifacts downloaded!')
-def download_job_artifacts(job_id: str) -> None:
+def download_job_artifacts(job_id: str, target_folder: Path) -> None:
artifacts_api_url = f'{BASE_URL}/buildjobs/{job_id}/artifacts'
req = requests.get(artifacts_api_url, headers=HEADERS)
req.raise_for_status()
response = req.json()
- build_folder = Path.cwd() / 'build'
-
for artifact in response:
filename = artifact['fileName']
console.print('Download', filename, '...')
file_url = f'{artifacts_api_url}/{filename}'
req = requests.get(file_url, headers=HEADERS)
req.raise_for_status()
- with open(build_folder / filename, 'wb') as file:
+ with open(target_folder / filename, 'wb') as file:
file.write(req.content)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/8f049c699a065269f6a50836c4a43167a8cb1f71
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/8f049c699a065269f6a50836c4a43167a8cb1f71
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits