[Git][ghc/ghc][wip/ghcup-ci] URL-encode the bindists

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Thu Jan 12 10:19:04 UTC 2023



Matthew Pickering pushed to branch wip/ghcup-ci at Glasgow Haskell Compiler / GHC


Commits:
14925495 by Matthew Pickering at 2023-01-12T10:18:52+00:00
URL-encode the bindists

- - - - -


1 changed file:

- .gitlab/mk_ghcup_metadata.py


Changes:

=====================================
.gitlab/mk_ghcup_metadata.py
=====================================
@@ -26,6 +26,7 @@ from urllib.request import urlopen
 import hashlib
 import sys
 import json
+import urllib.parse
 
 def eprint(*args, **kwargs):
     print(*args, file=sys.stderr, **kwargs)
@@ -151,13 +152,13 @@ def job_triple(job_name):
 def mk_one_metadata(release_mode, version, job_map, artifact):
     job_id = job_map[artifact.job_name].id
 
-    url = base_url.format(job_id=job_id, artifact_name=artifact.name.format(version=version))
+    url = base_url.format(job_id=job_id, artifact_name=urllib.parse.quote_plus(artifact.name.format(version=version)))
 
     eprint(artifact)
 
     if release_mode:
         final_url = release_base.format( version=version
-                                       , bindistName=f"{job_triple(artifact.job_name)}.tar.xz")
+                                       , bindistName=urllib.parse.quote_plus(f"{job_triple(artifact.job_name)}.tar.xz"))
     else:
         final_url = url
     eprint(final_url)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/14925495eeea21cac4dbc5b668e2c52bbaa445c3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/14925495eeea21cac4dbc5b668e2c52bbaa445c3
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230112/4d94f131/attachment-0001.html>


More information about the ghc-commits mailing list