[Git][ghc/ghc][master] upload_ghc_libs: More control over which packages to operate on

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Feb 14 16:28:08 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
b9282cf7 by Ben Gamari at 2023-02-14T11:27:50-05:00
upload_ghc_libs: More control over which packages to operate on

Here we add a `--skip` flag to `upload_ghc_libs`, making it easier to
limit which packages to upload. This is often necessary when one package
is not uploadable (e.g. see #22740).

- - - - -


1 changed file:

- .gitlab/rel_eng/upload_ghc_libs.py


Changes:

=====================================
.gitlab/rel_eng/upload_ghc_libs.py
=====================================
@@ -197,19 +197,24 @@ def main() -> None:
     parser_prepare.add_argument('--bindist', required=True, type=Path, help='extracted binary distribution')
 
     parser_upload = subparsers.add_parser('upload')
+    parser_upload.add_argument('--skip', default=[], action='append', type=str, help='skip uploading of the given package')
     parser_upload.add_argument('--docs', required = True, type=Path, help='folder created by --prepare')
     parser_upload.add_argument('--publish', action='store_true', help='Publish Hackage packages instead of just uploading candidates')
     args = parser.parse_args()
 
-    pkgs = args.pkg
+    pkgs = set(args.pkg)
     for pkg_name in pkgs:
         assert pkg_name in PACKAGES
 
-    if pkgs == []:
-        pkgs = PACKAGES.keys()
+    if not pkgs:
+        pkgs = set(PACKAGES.keys())
 
-    if args.command == "prepare":
+    if args.command == "upload":
+        for pkg_name in args.skip:
+            assert pkg_name in PACKAGES
+        pkgs = pkgs - set(args.skip)
 
+    if args.command == "prepare":
         manifest = {}
         for pkg_name in pkgs:
             print(pkg_name)



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b9282cf76f237412bae43e37c7a3deccb9fb22a1
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/20230214/83a2fd52/attachment-0001.html>


More information about the ghc-commits mailing list