Compare commits
21 commits
Author | SHA1 | Date | |
---|---|---|---|
4fa36f7bde | |||
b3be74ad3a | |||
8919ef3dc3 | |||
21b2e300a2 | |||
bf97e83d24 | |||
7f1c755c4e | |||
ae458763ae | |||
eb9f6dc3b1 | |||
72dad84521 | |||
60576fdfe3 | |||
4eb97db9d2 | |||
efd2798f01 | |||
6324734318 | |||
07561cb73f | |||
714382db9f | |||
fff0b171aa | |||
b02f37cfe4 | |||
2903951000 | |||
f9b62b2168 | |||
8db9e084af | |||
62e1bdf491 |
17 changed files with 114 additions and 8 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
*
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM python:3.12-slim
|
||||
|
||||
RUN apt update && apt install -y ffmpeg && pip install invoke
|
||||
|
||||
VOLUME ["/data"]
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
CMD /usr/local/bin/invoke probe
|
BIN
assets/All_I_Want_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
BIN
assets/All_I_Want_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/Angel_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
BIN
assets/Angel_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/Go_And_Die_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
BIN
assets/Go_And_Die_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/Heavens_Bells_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
BIN
assets/Heavens_Bells_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/If_You_Want_To_Die_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
BIN
assets/If_You_Want_To_Die_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/Last_Day_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
BIN
assets/Last_Day_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/Liar_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
BIN
assets/Liar_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/Loss_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
BIN
assets/Loss_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/Memories_-_Concrete_Foundation.ogg
(Stored with Git LFS)
Normal file
BIN
assets/Memories_-_Concrete_Foundation.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/Metal_Attack_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
BIN
assets/Metal_Attack_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/Twisted_Games_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
BIN
assets/Twisted_Games_-_Grimoff.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
28
build/freeloadio.run
Executable file
28
build/freeloadio.run
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from os import getenv
|
||||
from os.path import dirname
|
||||
from re import match
|
||||
from shlex import quote
|
||||
from subprocess import run
|
||||
|
||||
commit_before_sha = getenv("CI_COMMIT_BEFORE_SHA")
|
||||
commit_sha = getenv("CI_COMMIT_SHA")
|
||||
commit_ref_name = getenv("CI_COMMIT_REF_NAME")
|
||||
directories = set()
|
||||
|
||||
cmd = "git clone https://code.ryuslash.org/ryuslash/git-lfs-test.git ."
|
||||
print(cmd)
|
||||
run(cmd, shell=True)
|
||||
|
||||
if not match(r"^0+$", commit_before_sha):
|
||||
cmd = f"git diff --name-only {quote(commit_before_sha)} {quote(commit_sha)}"
|
||||
print(cmd)
|
||||
process = run(cmd, shell=True, capture_output=True)
|
||||
process_output = process.stdout.decode()
|
||||
print(process_output)
|
||||
for filename in process_output.strip().split("\n"):
|
||||
directories.add(dirname(filename))
|
||||
|
||||
unix_directory_list = str.join(":", directories)
|
||||
print(f"python tasks.py probe --directories={quote(unix_directory_list)}")
|
|
@ -1,9 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env python
|
||||
|
||||
while read precommit postcommit refname
|
||||
do
|
||||
echo "precommit: ${precommit}; postcommit: ${postcommit}; refname: ${refname}"
|
||||
if [[ "${precommit}" != "0000000000000000000000000000000000000000" ]]; then
|
||||
git diff --name-status $precommit $postcommit
|
||||
fi
|
||||
done
|
||||
from shlex import quote
|
||||
from subprocess import run
|
||||
import os
|
||||
import sys
|
||||
|
||||
for line in sys.stdin:
|
||||
precommit, postcommit, refname = line.strip().split(' ')
|
||||
|
||||
if not refname == "refs/heads/main":
|
||||
print(f"Skipping ref \"{refname}\"")
|
||||
continue
|
||||
|
||||
os.putenv("LAMINAR_REASON", "Push to git repository")
|
||||
cmd = "laminarc queue freeloadio " \
|
||||
f"CI_COMMIT_BEFORE_SHA={quote(precommit)} " \
|
||||
f"CI_COMMIT_SHA={quote(postcommit)} " \
|
||||
f"CI_COMMIT_REF_NAME={quote(refname)}"
|
||||
print(cmd)
|
||||
process = run(cmd, shell=True, capture_output=True)
|
||||
buildname, buildrun = process.stdout.decode().strip().split(':')
|
||||
print(f"Queued build: https://laminar.ryuslash.org/jobs/{buildname}/{buildrun}")
|
||||
|
|
21
build/git-pre-receive-hook
Executable file
21
build/git-pre-receive-hook
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
block_push=0
|
||||
|
||||
while read -r old new refname; do
|
||||
while read -r added deleted filename; do
|
||||
if [[ "$added" == "-" && "$deleted" == "-" ]]; then
|
||||
block_push=1
|
||||
echo "ERROR: ${filename} is a binary file."
|
||||
fi
|
||||
done < <(git diff --numstat "${old}..${new}")
|
||||
|
||||
if [[ $block_push -eq 1 ]]; then
|
||||
echo "The ref '${refname}' has been rejected"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $block_push -eq 1 ]]; then
|
||||
echo "Binary files blocked. Please use git-lfs to push to this repo."
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue