mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-22 06:23:01 +00:00
Properly check exit code, and fix symlink
This commit is contained in:
parent
47faf69797
commit
b6f475ea84
1 changed files with 3 additions and 3 deletions
6
build
6
build
|
@ -328,7 +328,7 @@ task_deploy() {
|
||||||
echo "connect sftp://${deploy_ssh_user}:@${deploy_ssh_host}:${deploy_ssh_port}";
|
echo "connect sftp://${deploy_ssh_user}:@${deploy_ssh_host}:${deploy_ssh_port}";
|
||||||
|
|
||||||
echo "mirror -R -P 3 \"${source_upload_dir}\" \"${deploy_root_dir}/www-new\"";
|
echo "mirror -R -P 3 \"${source_upload_dir}\" \"${deploy_root_dir}/www-new\"";
|
||||||
echo "ln -s \"../${deploy_root_dir}/data\" \"${deploy_root_dir}/www-new/data\"";
|
echo "ln -s \"../data\" \"${deploy_root_dir}/www-new/data\"";
|
||||||
|
|
||||||
echo "mv \"${deploy_root_dir}/www\" \"${deploy_root_dir}/www-old\"";
|
echo "mv \"${deploy_root_dir}/www\" \"${deploy_root_dir}/www-old\"";
|
||||||
echo "mv \"${deploy_root_dir}/www-new\" \"${deploy_root_dir}/www\"";
|
echo "mv \"${deploy_root_dir}/www-new\" \"${deploy_root_dir}/www\"";
|
||||||
|
@ -338,10 +338,10 @@ task_deploy() {
|
||||||
|
|
||||||
execute lftp --version;
|
execute lftp --version;
|
||||||
execute lftp -f "${lftp_commands_filename}";
|
execute lftp -f "${lftp_commands_filename}";
|
||||||
|
exit_code=$?
|
||||||
exec 9>&- # Close file descriptor 9 and release the lock
|
exec 9>&- # Close file descriptor 9 and release the lock
|
||||||
|
|
||||||
task_end $? "Failed to upload release";
|
task_end "${exit_code}" "Failed to upload release";
|
||||||
|
|
||||||
|
|
||||||
task_begin "Cleaning up";
|
task_begin "Cleaning up";
|
||||||
|
|
Loading…
Reference in a new issue