Skip to content
Merged
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
12 changes: 8 additions & 4 deletions backfill_corrections/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ run:
/bin/bash -c "cp params.host.json params.json && make gurobi.lic && make standardize-dirs && make run-local OPTIONS=\"${OPTIONS}\""

publish:
aws configure set aws_access_key_id $(AWS_KEY_ID)
aws configure set aws_secret_access_key $(AWS_SECRET_KEY)
aws s3 cp $(USR_INPUT_DIR) $(S3_BUCKET)/ --recursive --exclude "*" --include "*.csv.gz" --acl public-read
echo "SUCCESS: published `ls -1 $(USR_EXPORT_DIR)/*.csv.gz | wc -l` files to the S3 bucket" >> $(LOG_FILE)
if [ -f $(USR_INPUT_DIR)/*.csv.gz ]; then \
aws configure set aws_access_key_id $(AWS_KEY_ID); \
aws configure set aws_secret_access_key $(AWS_SECRET_KEY); \
aws s3 cp $(USR_INPUT_DIR) $(S3_BUCKET)/ --recursive --exclude "*" --include "*.csv.gz" --acl public-read; \
echo "SUCCESS: published `ls -1 $(USR_EXPORT_DIR)/*.csv.gz | wc -l` files to the S3 bucket" >> $(LOG_FILE); \
else \
echo "No files in $(USR_EXPORT_DIR) to publish" >> $(LOG_FILE); \
fi

pipeline: setup-dirs run publish clean

Expand Down