Commit 082dc9c3 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF: Couple of bugs

parent 7b5b42f8
......@@ -87,7 +87,7 @@ def clear_packages(channeldir, clear, patterns, dry_run):
if v['name'] == pkg.name]
# sort so oldest is first
pkgfiles = sorted(pkgfiles, sortkey)
pkgfiles = sorted(pkgfiles, key=sortkey)
pkgfiles = [pf[0] for pf in pkgfiles]
pkgfiles = [op.join(channeldir, plat, pf) for pf in pkgfiles]
......@@ -107,15 +107,16 @@ def main():
jobname = os.environ['CI_JOB_NAME']
if jobname == 'clear-public-channel':
channeldir = os.environ['FSLCONDA_INTERNAL_CHANNEL_DIRECTORY']
elif jobname == 'clear-internal-channel':
channeldir = os.environ['FSLCONDA_PUBLIC_CHANNEL_DIRECTORY']
elif jobname == 'clear-internal-channel':
channeldir = os.environ['FSLCONDA_INTERNAL_CHANNEL_DIRECTORY']
if clear is None or clear not in ('all', 'old'):
print('CLEAR must be set to "all" or "old"')
return 1
print(f'Clearing {clear} packages')
print(f' channel: {channeldir}')
print(f' pattern: {pattern}')
print(f' dry run: {dry_run}')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment