commit 90530904cc39b18aa8a93e5d60baa057b3f5f7a9 parent e5840d5cfed773de898d5f805d5c865681595521 Author: Emily Doherty <git@emily.sh> Date: Mon, 2 Oct 2023 01:07:49 -0700 Update Makefile to upload to S3 and generate sha256 sums Diffstat:
| M | Makefile | | | 31 | +++++++++++++++++++++++++------ |
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,14 +1,33 @@ token-current: - zip wow-token-current.zip wow-token-current.py + zip build/wow-token-current.zip wow-token-current.py + +token-current-upload: token-current + openssl dgst -sha256 -binary build/wow-token-current.zip | openssl enc -base64 > build/wow-token-current.zip.sha256 + aws s3 cp build/wow-token-current.zip s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1 + aws s3 cp build/wow-token-current.zip.sha256 s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1 token-historical: - zip wow-token-historical.zip wow-token-historical.py + zip build/wow-token-historical.zip wow-token-historical.py + +token-historical-upload: token-historical + openssl dgst -sha256 -binary build/wow-token-historical.zip | openssl enc -base64 > build/wow-token-historical.zip.sha256 + aws s3 cp build/wow-token-historical.zip s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1 + aws s3 cp build/wow-token-historical.zip.sha256 s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1 token-updater: - cd venv/lib/python3.9/site-packages && zip -r ../../../../wow-token-updater.zip . - zip -g wow-token-updater.zip wow-token-updater.py + cd venv/lib/python3.9/site-packages && zip -qr ../../../../build/wow-token-updater.zip . + zip -g build/wow-token-updater.zip wow-token-updater.py + +token-updater-upload: token-updater + openssl dgst -sha256 -binary build/wow-token-updater.zip | openssl enc -base64 > build/wow-token-updater.zip.sha256 + aws s3 cp build/wow-token-updater.zip s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1 + aws s3 cp build/wow-token-updater.zip.sha256 s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1 + + +upload: token-current-upload token-updater-upload token-historical-upload clean: - rm -v wow-token-current.zip wow-token-historical.zip wow-token-updater.zip + rm -v build/* + +all: upload -all: token-current token-historical token-updater