(paths)
| 19 | |
| 20 | |
| 21 | def classify(paths): |
| 22 | outputs = dict(go=False, web=True, nix=False, parity=False) |
| 23 | for path in paths: |
| 24 | if path.startswith(('.github/workflows/', 'scripts/ci-')): |
| 25 | return dict.fromkeys(outputs, True) |
| 26 | outputs['go'] |= not path.startswith('web/') |
| 27 | outputs['parity'] |= path.startswith('web/') |
| 28 | outputs['nix'] |= (path.startswith('nix/') or |
| 29 | ('/' not in path and fnmatch.fnmatchcase(path, 'flake.*')) or |
| 30 | path in NIX_FILES) |
| 31 | return outputs |
| 32 | |
| 33 | |
| 34 | def git(*args, cwd=None): |