Commit f68dc531 authored by AlmAck's avatar AlmAck
Browse files

set the destination repository globally

so that all functions can use the same variable and the lock/unlock works as expected
parent 170777c0
......@@ -9,6 +9,8 @@ _do list_upload_packages
if [ -z "$UPLOAD_LIST" ]; then
_log success "Done nothing to upload!"
# set the deploy repository based on the commit message
_do _set_deploy_repo $(get_repository)
# lock the repository for the whole upload process to prevent
# the CI to fail in between of the operations
_do _lock_repo
......@@ -16,11 +18,11 @@ else
# sanity check
_do check-upload
# rsync upload
_do upload_files $(get_repository)
_do upload_files
# akbm to add to the repository
_do update_remote_db
# sign the remote database
_do sign_database $(get_repository)
_do sign_database
_do _unlock_repo
_log success "Done uploading!"
......@@ -81,7 +81,6 @@ function _upload_files() {
function upload_files() {
_do _set_deploy_repo $1
_log build_step "Start uploading to [$DEPLOY_REPO] the following packages: ${UPLOAD_LIST[@]}"
_do_deploy _upload_files "${UPLOAD_LIST[@]}"
_log success "rsync upload done"
......@@ -113,8 +112,6 @@ function sign_database() {
echo "$GPG_PASSWORD" | gpg -sb --pinentry-mode loopback --passphrase-fd 0 "$dir/$DEPLOY_REPO.db.tar.xz"
echo "$GPG_PASSWORD" | gpg -sb --pinentry-mode loopback --passphrase-fd 0 "$dir/$DEPLOY_REPO.db.tar.gz"
_do _set_deploy_repo $1
DB_UPLOAD_LIST=( $(set -o noglob; find $dir -name '*.db.tar.*' \( $(_find_args ${args[@]}) \) -print) )
_log build_step "Start uploading to [$DEPLOY_REPO] the following files ${DB_UPLOAD_LIST[@]}"
_do_deploy _upload_files "${DB_UPLOAD_LIST[@]}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment