@@ -6,9 +6,9 @@ import os.path
66import shlex
77import subprocess
88
9- CACHE_ONE_HOUR = ("-h " , "Cache-Control: public, max-age=3600" ) # gcs default
10- CACHE_FIVE_MINUTES = ("-h " , "Cache-Control: public, max-age=300" )
11- CACHE_NO = ("-h " , "Cache-Control: no-store" )
9+ CACHE_ONE_HOUR = ("--cache-control " , "public, max-age=3600" ) # gcs default
10+ CACHE_FIVE_MINUTES = ("--cache-control " , "public, max-age=300" )
11+ CACHE_NO = ("--cache-control " , "no-store" )
1212
1313
1414def main () -> int :
@@ -24,20 +24,20 @@ def main() -> int:
2424 cmds = (
2525 # upload wheels first before the index
2626 (
27- "gsutil" ,
28- * CACHE_ONE_HOUR , # these are immutable so cache at default
29- "-m" , # parallel
27+ "gcloud" ,
28+ "storage" ,
3029 "cp" ,
3130 "-n" , # no-clobber
31+ * CACHE_ONE_HOUR , # these are immutable so cache at default
3232 os .path .join (args .index , "wheels" , "*" ),
3333 "gs://pypi.devinfra.sentry.io/wheels/" ,
3434 ),
3535 # upload the site parts in clobber mode (may be updating pages)
3636 (
37- "gsutil" ,
38- * CACHE_FIVE_MINUTES , # shorter than default to make pip snappier
39- "-m" , # parallel
37+ "gcloud" ,
38+ "storage" ,
4039 "cp" ,
40+ * CACHE_FIVE_MINUTES , # shorter than default to make pip snappier
4141 "-r" , # recursive
4242 * (
4343 os .path .join (args .index , name )
@@ -47,10 +47,11 @@ def main() -> int:
4747 "gs://pypi.devinfra.sentry.io" ,
4848 ),
4949 (
50- "gsutil" ,
50+ "gcloud" ,
51+ "storage" ,
52+ "cp" ,
5153 # the packages.json file must be consistently read so no caching
5254 * CACHE_NO ,
53- "cp" ,
5455 os .path .join (args .index , "packages.json" ),
5556 "gs://pypi.devinfra.sentry.io" ,
5657 ),
0 commit comments