Skip to content

Commit cb4828d

Browse files
author
Greg Bowler
committed
WIP: MOVE SHEBANG
1 parent b754c0b commit cb4828d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

deploy-action.bash

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ cd "$GITHUB_WORKSPACE"
1515
# Pass in required variables to post-transfer script:
1616
full_transfer_path="$ACTION_TRANSFER_PATH/$GITHUB_SHA"
1717
action_dir="$(dirname -- "${BASH_SOURCE[0]}")"
18-
{ declare -p \
18+
{
19+
echo "#!/bin/bash"; \
20+
declare -p \
1921
ACTION_PATH \
2022
GITHUB_REF_NAME \
2123
full_transfer_path \
2224
; \
23-
cat "$action_dir"/remote-post-transfer.bash; } > ./post-transfer.bash
25+
cat "$action_dir"/remote-post-transfer.bash;
26+
} > ./post-transfer.bash
2427
chmod +x ./post-transfer.bash
2528
# Archive directory and pipe over SSH:
2629
dir_size_human=$(du -sbh --exclude "./.git" | grep -o "[0-9]*")
@@ -30,7 +33,7 @@ tar -czf - --exclude-vcs . | \
3033
-i "$ssh_key_path" \
3134
-p "$ACTION_PORT" \
3235
"$ACTION_USER"@"$ACTION_HOSTNAME" \
33-
"rm -rf $full_transfer_path && mkdir -p $full_transfer_path && cd $full_transfer_path && tar -xzf - && mv ./post-transfer.bash $ACTION_POST_TRANSFER_SCRIPT && echo $ACTION_POST_TRANSFER_SCRIPT_PREFIX $ACTION_POST_TRANSFER_SCRIPT && cat $ACTION_POST_TRANSFER_SCRIPT"
36+
"rm -rf $full_transfer_path && mkdir -p $full_transfer_path && cd $full_transfer_path && tar -xzf - && mv ./post-transfer.bash $ACTION_POST_TRANSFER_SCRIPT && echo $ACTION_POST_TRANSFER_SCRIPT_PREFIX $ACTION_POST_TRANSFER_SCRIPT && cat $ACTION_POST_TRANSFER_SCRIPT && $ACTION_POST_TRANSFER_SCRIPT_PREFIX $ACTION_POST_TRANSFER_SCRIPT"
3437
echo "Transfer complete"
3538

3639
#action_dir="$(dirname -- "${BASH_SOURCE[0]}")"

remote-post-transfer.bash

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/bin/bash
21
full_transfer_path=${full_transfer_path:-"/dev/null"}
32
source_dir="$full_transfer_path"
43
destination_dir="$ACTION_PATH/$GITHUB_REF_NAME"

0 commit comments

Comments
 (0)