Compare commits

..

No commits in common. "fff0b171aa6583f7435b426bbba2def754c7e51d" and "29039510008543f4c9fedd712f65be68d8e47c26" have entirely different histories.

2 changed files with 8 additions and 30 deletions

Binary file not shown.

View file

@ -1,28 +1,9 @@
#!/usr/bin/env python #!/usr/bin/env bash
from shlex import quote while read precommit postcommit refname
from subprocess import run do
import os echo "precommit: ${precommit}; postcommit: ${postcommit}; refname: ${refname}"
import re if [[ "${precommit}" != "0000000000000000000000000000000000000000" ]]; then
import sys git diff --name-status $precommit $postcommit
fi
directories = set() done
for line in sys.stdin:
precommit, postcommit, refname = line.split(' ')
if not refname == "refs/heads/main":
print(f"Skipping ref {refname}")
continue
print(f"precommit: {precommit}; postcommit: {postcommit}; refname: {refname}")
if not re.match(r"^0+$", precommit):
process = run(f"git diff --name-only {quote(precommit)} {quote(postcommit)}", shell=True, capture_output=True)
for filename in process.stdout.strip().split(b'\n'):
directories.add(os.path.dirname(filename).decode())
os.putenv("LAMINAR_REASON", "Push to git repository")
process = run(f"laminarc queue freeloadio directories={quote(str.join(';', directories))}", shell=True, capture_output=True)
buildname, buildrun = process.stdout.strip().split(b':')
print(f"Queued build: https://laminar.ryuslash.org/jobs/{buildname}/{buildrun}")