INNER CODE UNIT · Python
target
alper-han/CrossMacro · scripts/ci/nuget-cache.py:59
target = feed / archive.name
if not target.exists():
shutil.copyfile(archive, target)
for archive in feed.glob('*.nupkg'):
if archive.name not in used:
archive.unlink()
return len(used)
def append(path, values):
with open(path, 'a', encoding='utf-8') as stream:
for key, value in values.items():
stream.write(f'{key}={value}\n')
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('command', choices=['prepare', 'collect', 'restored', 'summary'])