mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-12-22 10:25:01 +00:00
build/lftp: Use commands file
This commit is contained in:
parent
d74ba662fa
commit
07348570ff
1 changed files with 6 additions and 1 deletions
7
build
7
build
|
@ -319,6 +319,8 @@ task_deploy() {
|
|||
# 3. Create data dir symlink
|
||||
# 4. Swap in new directory
|
||||
# 5. Delete old directory
|
||||
lftp_commands_filename="$(mktemp --suffix "-commands.lftp")";
|
||||
|
||||
(
|
||||
echo "set sftp:connect-program 'ssh -x -i \"${SSH_KEY_PATH}\" -p \"${deploy_ssh_port}\" -o \"PasswordAuthentication=no\"'";
|
||||
# We have an extra : before the @ here to avoid the password prompt
|
||||
|
@ -331,7 +333,10 @@ task_deploy() {
|
|||
echo "mv \"${deploy_root_dir}/www-new\" \"${deploy_root_dir}/www\"";
|
||||
echo "rm -r \"${deploy_root_dir}/www-old\"";
|
||||
echo "bye";
|
||||
) | tee | lftp
|
||||
) >"${lftp_commands_filename}";
|
||||
|
||||
execute lftp --version;
|
||||
execute lftp -f "${lftp_commands_filename}";
|
||||
|
||||
exec 9>&- # Close file descriptor 9 and release the lock
|
||||
|
||||
|
|
Loading…
Reference in a new issue