Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resources:
path: [<optional>, use to sync to a specific path of the bucket instead of root of bucket]
options: [<optional, see note below>]
region: <optional, see below>
upload_only: <optional, boolean>
jobs:
- name: <job name>
plan:
Expand Down
11 changes: 8 additions & 3 deletions assets/in
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ fi
# Export AWS_DEFAULT_REGION if set
[ -n "$AWS_DEFAULT_REGION" ] && export AWS_DEFAULT_REGION

echo "Downloading from S3..."
eval aws s3 sync "s3://$bucket/$path" $dest $options
echo "...done."
# skip if upload only
if [ $(echo "$payload" | jq -r '.source.upload_only') = true ]; then
echo "Skipping download..."
else
echo "Downloading from S3..."
eval aws s3 sync "s3://$bucket/$path" $dest $options
echo "...done."
fi

source "$(dirname $0)/emit.sh" >&3