Skip to content
Permalink
Browse files

build/lftp: Use commands file

  • Loading branch information...
sbrl committed Apr 7, 2019
1 parent d74ba66 commit 07348570ff00b3e53dae8876bc9ad6f98ddf4f90
Showing with 6 additions and 1 deletion.
  1. +6 −1 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

0 comments on commit 0734857

Please sign in to comment.
You can’t perform that action at this time.