File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 81
81
/bin/bash -c " cp params.host.json params.json && make gurobi.lic && make standardize-dirs && make run-local OPTIONS=\" ${OPTIONS} \" "
82
82
83
83
publish :
84
- aws configure set aws_access_key_id $(AWS_KEY_ID )
85
- aws configure set aws_secret_access_key $(AWS_SECRET_KEY )
86
- aws s3 cp $(USR_INPUT_DIR ) $(S3_BUCKET ) / --recursive --exclude " *" --include " *.csv.gz" --acl public-read
87
- echo " SUCCESS: published ` ls -1 $( USR_EXPORT_DIR) /* .csv.gz | wc -l` files to the S3 bucket" >> $(LOG_FILE )
84
+ if [ -f $( USR_INPUT_DIR) /* .csv.gz ]; then \
85
+ aws configure set aws_access_key_id $(AWS_KEY_ID ) ; \
86
+ aws configure set aws_secret_access_key $(AWS_SECRET_KEY ) ; \
87
+ aws s3 cp $(USR_INPUT_DIR ) $(S3_BUCKET ) / --recursive --exclude " *" --include " *.csv.gz" --acl public-read; \
88
+ echo " SUCCESS: published ` ls -1 $( USR_EXPORT_DIR) /* .csv.gz | wc -l` files to the S3 bucket" >> $(LOG_FILE ) ; \
89
+ else \
90
+ echo " No files in $( USR_EXPORT_DIR) to publish" >> $(LOG_FILE ) ; \
91
+ fi
88
92
89
93
pipeline : setup-dirs run publish clean
90
94
You can’t perform that action at this time.
0 commit comments