diff --git a/Dockerfile b/Dockerfile index fc836c3..e718599 100644 --- a/Dockerfile +++ b/Dockerfile @@ -113,12 +113,10 @@ ARG odoo_version # Install Odoo requirements (use ADD for correct layer caching). # We use requirements from OCB for easier maintenance of older versions. -ADD https://api.github.com/repos/OCA/OCB/git/refs/heads/$odoo_version /tmp/branch.json +ADD https://api.github.com/repos/OCA/OCB/contents/requirements.txt?ref=$odoo_version /tmp/requirements_content.json -# Use the commit SHA from JSON to download exact requirements.txt -RUN SHA=$(jq -r .object.sha /tmp/branch.json) \ - && curl -sSL "https://raw.githubusercontent.com/OCA/OCB/${SHA}/requirements.txt" \ - -o /tmp/ocb-requirements.txt +# Use the content from the file downloaded +RUN jq -r .content /tmp/requirements_content.json | base64 -d > /tmp/ocb-requirements.txt # The sed command is to use the latest version of gevent and greenlet. The # latest version works with all versions of Odoo that we support here, and the # oldest pinned in Odoo's requirements.txt don't have wheels, and don't build diff --git a/Dockerfile-legacypy b/Dockerfile-legacypy index 8b015a0..40a1f47 100644 --- a/Dockerfile-legacypy +++ b/Dockerfile-legacypy @@ -108,12 +108,10 @@ ARG odoo_version # Install Odoo requirements (use ADD for correct layer caching). # We use requirements from OCB for easier maintenance of older versions. -ADD https://api.github.com/repos/OCA/OCB/git/refs/heads/$odoo_version /tmp/branch.json +ADD https://api.github.com/repos/OCA/OCB/contents/requirements.txt?ref=$odoo_version /tmp/requirements_content.json -# Use the commit SHA from JSON to download exact requirements.txt -RUN SHA=$(jq -r .object.sha /tmp/branch.json) \ - && curl -sSL "https://raw.githubusercontent.com/OCA/OCB/${SHA}/requirements.txt" \ - -o /tmp/ocb-requirements.txt +# Use the content from the file downloaded +RUN jq -r .content /tmp/requirements_content.json | base64 -d > /tmp/ocb-requirements.txt # The sed command is to use the latest version of gevent and greenlet. The # latest version works with all versions of Odoo that we support here, and the # oldest pinned in Odoo's requirements.txt don't have wheels, and don't build