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

Commit

Permalink
Upload MANIFEST.json.bz2 and MANIFEST.json.zst
Browse files Browse the repository at this point in the history
The first half of #16081.
  • Loading branch information
gsnedders committed Mar 26, 2019
1 parent 22be9a9 commit 00d3aeb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
4 changes: 3 additions & 1 deletion tools/ci/action_manifest_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ mkdir -p ~/meta
WPT_MANIFEST_FILE=~/meta/MANIFEST.json

./wpt manifest -p $WPT_MANIFEST_FILE
gzip -f --best $WPT_MANIFEST_FILE
gzip -k -f --best $WPT_MANIFEST_FILE
bzip2 -k -f --best $WPT_MANIFEST_FILE
zstd -k -f --ultra -22 $WPT_MANIFEST_FILE
22 changes: 12 additions & 10 deletions tools/ci/tag_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,21 @@ def create_release(owner, repo, sha, tag, summary, body):
# Upload URL contains '{?name,label}' at the end which we want to remove
upload_url = create_data["upload_url"].split("{", 1)[0]

upload_filename = "MANIFEST-%s.json.gz" % sha
params = {"name": upload_filename,
"label": "MANIFEST.json.gz"}
upload_exts = [".gz", ".bz2", ".zst"]
for upload_ext in upload_exts:
upload_filename = "MANIFEST-%s.json%s" % (sha, upload_ext)
params = {"name": upload_filename,
"label": "MANIFEST.json%s" % upload_ext}

with open(os.path.expanduser("~/meta/MANIFEST.json.gz"), "rb") as f:
upload_data = f.read()
with open(os.path.expanduser("~/meta/MANIFEST.json%s" % upload_ext), "rb") as f:
upload_data = f.read()

logger.info("Uploading %s bytes" % len(upload_data))
logger.info("Uploading %s bytes" % len(upload_data))

upload_resp = request(upload_url, "Manifest upload", data=upload_data, params=params,
headers={'Content-Type': 'application/octet-stream'})
if not upload_resp:
return False
upload_resp = request(upload_url, "Manifest upload", data=upload_data, params=params,
headers={'Content-Type': 'application/octet-stream'})
if not upload_resp:
return False

return True

Expand Down
4 changes: 3 additions & 1 deletion tools/docker/github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ ENV DEBIAN_FRONTEND=noninteractive \

RUN apt-get -qqy update \
&& apt-get -qqy install \
bzip2 \
git \
locales \
python \
python-pip \
tzdata
tzdata \
zstd

RUN pip install --upgrade pip
RUN pip install virtualenv
Expand Down

0 comments on commit 00d3aeb

Please sign in to comment.