deploy.sh 785 Bytes
Newer Older
Luca Giambonini's avatar
Luca Giambonini committed
1 2
#!/usr/bin/env bash
SCRIPT_DIR=$( dirname $( readlink -e $0 ) )
3 4
source "$SCRIPT_DIR/lib/ci-library.sh"
source "$SCRIPT_DIR/lib/ci-deploy-library.sh"
Luca Giambonini's avatar
Luca Giambonini committed
5 6 7 8 9 10 11

# get the list of packages to upload
_do list_upload_packages

if [ -z "$UPLOAD_LIST" ]; then
    _log success "Done nothing to upload!"
else
12 13
    # set the deploy repository based on the commit message
    _do _set_deploy_repo $(get_repository)
14 15 16 17
    # lock the repository for the whole upload process to prevent
    # the CI to fail in between of the operations
    _do _lock_repo

18 19
    # sanity check
    _do check-upload
Luca Giambonini's avatar
Luca Giambonini committed
20
    # rsync upload
21
    _do upload_files
Luca Giambonini's avatar
Luca Giambonini committed
22 23
    # akbm to add to the repository
    _do update_remote_db
24
    # sign the remote database
25
    _do sign_database
Luca Giambonini's avatar
Luca Giambonini committed
26

27
    _do _unlock_repo
Luca Giambonini's avatar
Luca Giambonini committed
28 29
    _log success "Done uploading!"
fi