Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #216 from Financial-Times/matth/use-upload-assets-…
Browse files Browse the repository at this point in the history
…to-s3-task

Refactor deploy-assets task to use the generic upload-assets-to-s3
  • Loading branch information
i-like-robots authored Nov 27, 2019
2 parents f78b51f + 16d85fc commit 4e50356
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/tasks/deploy.mk
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
#Must be above deplo%
deploy-asset%: ## deploy-assets: uploads static files such as CSS and JS to S3 based on the contents of a manifest file
@if [ -e public/manifest.json ]; then\
nht deploy-hashed-assets --monitor-assets --manifest-file manifest.json --assets-are-hashed --destination-directory page-kit;\
deploy-asset%: ## deploy-assets: uploads static files such as CSS and JS to S3
@if [ -e public/manifest.json ]; then \
nht upload-assets-to-s3 \
--accessKeyId=$(aws_access_hashed_assets) \
--secretAccessKey=$(aws_secret_hashed_assets) \
--directory="public" \
--bucket="ft-next-hashed-assets-prod" \
--destination="hashed-assets/page-kit" \
&& nht upload-assets-to-s3 \
--accessKeyId=$(aws_access_hashed_assets) \
--secretAccessKey=$(aws_secret_hashed_assets) \
--directory="public" \
--bucket="ft-next-hashed-assets-prod-us" \
--destination="hashed-assets/page-kit"; \
fi

@if [ -e public/asset-hashes.json ]; then\
nht deploy-hashed-assets --monitor-assets;\
@if [ -e public/asset-hashes.json ]; then \
nht deploy-hashed-assets --monitor-assets; \
fi

#Must be above deplo%
Expand Down

0 comments on commit 4e50356

Please sign in to comment.