Implement building with docker

See the README for usages and details.

A breaking changes here too:
* run.py is gone, we now handle that kind of thing with docker
* The token is out of the config and is now an ENVAR (ideally using a .env)
* `.json` files are now in a .matchy/ subdirectory, as this makes it a lot easier for the container to safely read

Bonus:
* fix a score_factors.setdefault call causing issues
* Reformat some of the readme
This commit is contained in:
Marc Di Luzio 2024-08-14 16:55:23 +01:00
parent b810dedb26
commit 3a0bf82ecb
10 changed files with 174 additions and 95 deletions

View file

@ -1,17 +0,0 @@
import sys
import git
import subprocess
# Pull the release branch
repo = git.Repo(search_parent_directories=True)
if repo.active_branch.name != "release":
print(f"Refusing to run on branch '{repo.active_branch.name}'")
sys.exit(1)
repo.remotes.origin.pull()
# Install any new pip requirements
subprocess.run([sys.executable, "-m", "pip", "install",
"-r", "requirements.txt"], check=True)
# Run Matchy!
subprocess.run([sys.executable, "py/matchy.py"], check=True)