fixup(ci:upload): Treat failure to add debs to repository as error

This commit is contained in:
Yaksh Bariya 2022-04-14 10:54:20 +05:30
parent 42370d19c5
commit 5b8b15e7aa
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
2 changed files with 6 additions and 2 deletions

View File

@ -214,7 +214,8 @@ jobs:
# Publishing repository changes.
if [ "$uploaded_files" = "true" ]; then
aptly_add_to_repo
if ! aptly_add_to_repo
exit 1
# Usually temporary directory is deleted automatically, but in certain cases it is left.
aptly_delete_dir
@ -251,7 +252,8 @@ jobs:
# Publishing repository changes.
if [ "$uploaded_files" = "true" ]; then
aptly_add_to_repo
if ! aptly_add_to_repo
exit 1
# Usually temporary directory is deleted automatically, but in certain cases it is left.
aptly_delete_dir

View File

@ -78,7 +78,9 @@ aptly_add_to_repo() {
fi
else
echo "[$(date +%H:%M:%S)] Error: got http_status_code == '$http_status_code', packages may not appear in repository."
return 1
fi
return 0
}
aptly_publish_repo() {