|
|
@ -54,7 +54,6 @@ class ConfigParser: |
|
|
|
paths = [] |
|
|
|
for path in changes["paths"]: |
|
|
|
paths.append(os.path.abspath(path)) |
|
|
|
print(paths) |
|
|
|
# TODO: Error handling |
|
|
|
command = ["git", "diff", "--name-only", target] |
|
|
|
with subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p: |
|
|
@ -64,8 +63,9 @@ class ConfigParser: |
|
|
|
for path in paths: |
|
|
|
spec_path = os.path.abspath(path) |
|
|
|
if change_path.startswith(spec_path): |
|
|
|
print(f"Modified file: {change_path}") |
|
|
|
print(f"Path match: {path}") |
|
|
|
if self.verbose: |
|
|
|
print(f"[Alice] Modified file: {change_path}") |
|
|
|
print(f"[Alice] Path match: {path}") |
|
|
|
return True |
|
|
|
except KeyError: |
|
|
|
raise ConfigException(f"Invalid 'changes' config: {changes}") |
|
|
@ -82,5 +82,5 @@ class ConfigParser: |
|
|
|
runner.run(job_spec) |
|
|
|
return "SUCCESS" |
|
|
|
else: |
|
|
|
print("SKIP, no change detected") |
|
|
|
return "SKIP, no change detected" |
|
|
|
|
|
|
|