summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-06-27 22:40:17 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2022-07-05 11:15:56 +0100
commite3101bf136cf4054596f2856b9c33283c987bc4d (patch)
tree712dc67b601d6ee00bf0d46a6929e1bf55bc3325
parent3e99c9f103333a905a484228dee9b0adc4f16de5 (diff)
downloadhaskell-e3101bf136cf4054596f2856b9c33283c987bc4d.tar.gz
docs-upload: Fix upload script when no packages are listed
(cherry picked from commit ed793d7a5725689bf1f3c81ce3d7958ccaf60e7e)
-rwxr-xr-x.gitlab/upload_ghc_libs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/.gitlab/upload_ghc_libs.py b/.gitlab/upload_ghc_libs.py
index a3f3084891..f9cf7b1815 100755
--- a/.gitlab/upload_ghc_libs.py
+++ b/.gitlab/upload_ghc_libs.py
@@ -196,9 +196,10 @@ def main() -> None:
for pkg_name in pkgs:
assert pkg_name in PACKAGES
+ if pkgs == []:
+ pkgs = PACKAGES.keys()
+
if args.command == "prepare":
- if pkgs == []:
- pkgs = PACKAGES.keys()
manifest = {}
for pkg_name in pkgs:
@@ -215,7 +216,7 @@ def main() -> None:
with open(manifest_path / 'manifest.pickle', 'rb') as fin:
manifest = pickle.load(fin)
for pkg, item in manifest.items():
- if pkgs != [] and pkg.name in pkgs:
+ if pkg.name in pkgs:
print(pkg, item)
upload_pkg(pkg, manifest_path, item, publish=args.publish)