From e910989a77818f790d74d2a1d5f093b1d05b026e Mon Sep 17 00:00:00 2001 From: Vasily Pleshakov Date: Thu, 31 Jan 2019 23:52:08 +0400 Subject: [PATCH] Add .appveyorrc file generation --- scripts/enable-ssh.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/enable-ssh.sh b/scripts/enable-ssh.sh index 5596634..422b668 100644 --- a/scripts/enable-ssh.sh +++ b/scripts/enable-ssh.sh @@ -61,9 +61,16 @@ if [[ -n "${APPVEYOR_SSH_BLOCK}" ]] && ${APPVEYOR_SSH_BLOCK}; then # create "lock" file. touch "${LOCK_FILE}" echo -e "Build paused. To resume it, open a SSH session to run '${YELLOW}rm "${LOCK_FILE}"${NC}' command." + # export all APPVEYOR_* variables to .appveyorrc file so it could be available to ssh session + export -p|grep -E '^declare -x APPVEYOR_' > $HOME/.appveyorrc + # this might fail if there is multiline values + echo "source $HOME/.appveyorrc" >> $HOME/.profile # wait until "lock" file is deleted by user. while [ -f "${LOCK_FILE}" ]; do sleep 1 done echo "Build lock file has been deleted. Resuming build." + if [ -f "$HOME/.appveyorrc" ]; then + rm "$HOME/.appveyorrc" + fi fi