You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2020/07/11 15:28:55 UTC
[libcloud] 01/03: Update scrape-provider-prices tox target so we
also generate sha256 and sha512 sum files.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit c9e44b853d566bd12fa64936195d9f5b8ddb4bd4
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Sat Jul 11 17:20:31 2020 +0200
Update scrape-provider-prices tox target so we also generate sha256 and
sha512 sum files.
This allows users to download and cache values of those files and only
download pricing.json file if the sha sum files have changed.
---
tox.ini | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tox.ini b/tox.ini
index d6d2d7d..f2093e7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -124,10 +124,16 @@ basepython: python3.7
deps = requests
demjson
passenv = GCE_API_KEY
+whitelist_externals = sha512sum
+ bash
commands =
python contrib/scrape-gce-prices.py --all
python contrib/scrape-gce-prices.py
python contrib/scrape-ec2-prices.py
+ # We also store the SHa512 sum so users can check if something has changed
+ # by caching and checking the value of the shasum file
+ bash -c "(cd libcloud/data/ ; sha256sum pricing.json > {toxinidir}/libcloud/data/pricing.json.sha256)"
+ bash -c "(cd libcloud/data/ ; sha512sum pricing.json > {toxinidir}/libcloud/data/pricing.json.sha512)"
[testenv:scrape-ec2-prices]
basepython: python3.7