Introduce V2 of current and historical functions

This commit is contained in:
2024-11-03 23:18:06 -08:00
parent 27cd98ee52
commit ff8e182336
21 changed files with 655 additions and 428 deletions

View File

@@ -1,4 +1,17 @@
requirements:
rm -rf package
pip install --platform manylinux2014_aarch64 --target=package --implementation cp --python-version 3.12 --only-binary=:all: -r requirements.txt
requirements-arm64:
rm -rf package
pip install --target=package --implementation cp --python-version 3.12 -r requirements.txt
clean-pycache:
rm -rvf wow_token/__pycache__
rm -rvf wow_token/db/__pycache__
token-current:
rm -f build/wow-token-current.zip
zip build/wow-token-current.zip wow-token-current.py
token-current-upload: token-current
@@ -6,7 +19,18 @@ token-current-upload: token-current
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-current-v2: clean-pycache
rm -f build/wow-token-current-v2.zip
zip -r build/wow-token-current-v2.zip wow_token
zip -g build/wow-token-current-v2.zip wow-token-current-v2.py
token-current-v2-upload: token-current-v2
openssl dgst -sha256 -binary build/wow-token-current-v2.zip | openssl enc -base64 > build/wow-token-current-v2.zip.sha256
aws s3 cp build/wow-token-current-v2.zip s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1
aws s3 cp build/wow-token-current-v2.zip.sha256 s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1
token-historical:
rm -f build/wow-token-historical.zip
zip build/wow-token-historical.zip wow-token-historical.py
token-historical-upload: token-historical
@@ -14,8 +38,19 @@ token-historical-upload: token-historical
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 -qr ../../../../build/wow-token-updater.zip .
token-historical-v2: clean-pycache
rm -f build/wow-token-historical-v2.zip
zip -r build/wow-token-historical-v2.zip wow_token
zip -g build/wow-token-historical-v2.zip wow-token-historical-v2.py
token-historical-v2-upload: token-historical-v2
openssl dgst -sha256 -binary build/wow-token-historical-v2.zip | openssl enc -base64 > build/wow-token-historical-v2.zip.sha256
aws s3 cp build/wow-token-historical-v2.zip s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1
aws s3 cp build/wow-token-historical-v2.zip.sha256 s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1
token-updater: requirements
rm -f build/wow-token-updater.zip
cd package && zip -qr ../build/wow-token-updater.zip .
zip -g build/wow-token-updater.zip wow-token-updater.py
token-updater-upload: token-updater
@@ -23,8 +58,16 @@ token-updater-upload: token-updater
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
token-compactor: requirements
rm -f build/wow-token-compactor.zip
zip build/wow-token-compactor.zip wow-token-compactor.py
upload: token-current-upload token-updater-upload token-historical-upload
token-compactor-upload: token-compactor
openssl dgst -sha256 -binary build/wow-token-compactor.zip | openssl enc -base64 > build/wow-token-compactor.zip.sha256
aws s3 cp build/wow-token-compactor.zip s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1
aws s3 cp build/wow-token-compactor.zip.sha256 s3://emily-infrastructure-artifacts/wowtoken-backend/ --region us-west-1
upload: token-current-v2-upload token-updater-upload token-historical-upload token-compactor-upload
clean:
rm -v build/*