-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐝 Add preflight check for "make sync-images"
It now checks if you have installed the AWS CLI, and whether you have configured it, before letting you proceed.
- Loading branch information
1 parent
b301507
commit c002b2f
Showing
1 changed file
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,6 +130,8 @@ migrate: | |
@echo '==> Running DB migrations' | ||
yarn && yarn buildTsc && yarn runDbMigrations | ||
|
||
refresh.full: refresh refresh.wp sync-images | ||
|
||
refresh: | ||
@echo '==> Downloading chart data' | ||
./devTools/docker/download-grapher-metadata-mysql.sh | ||
|
@@ -153,11 +155,16 @@ refresh.wp: | |
@echo '[email protected] user to the value from `.env:WORDPRESS_API_PASS`' | ||
@echo 'at https://staging.owid.cloud/wp/wp-admin/user-edit.php?user_id=35' | ||
|
||
sync-images: | ||
sync-images: sync-images.preflight-check | ||
@echo '==> Syncing S3 images' | ||
@. ./.env && ./devTools/docker/sync-s3-images.sh | ||
|
||
refresh.full: refresh refresh.wp sync-images | ||
sync-images.preflight-check: | ||
@echo '==> Checking for aws cli' | ||
@which aws >/dev/null 2>&1 || (echo "ERROR: please install aws cli -- e.g. brew install awscli"; exit 1) | ||
@echo '==> Checking if aws cli is configured' | ||
@test -f ~/.aws/config || (echo "ERROR: please configure aws cli -- e.g. aws configure"; exit 1) | ||
|
||
|
||
down: | ||
@echo '==> Stopping services' | ||
|