debatelab-admin's picture
Make commit env variable optional
3a1fbe6 verified
raw
history blame contribute delete
329 Bytes
import subprocess
import os
commit = f"@{os.environ['GITHUB_COMMIT']}" if 'GITHUB_COMMIT' in os.environ else ""
package_url = f"git+https://{os.environ['GITHUB_TOKEN']}@github.com/debatelab/evidence-seeker" + commit
subprocess.check_call(["pip", "install", package_url])
with open("app.py", "r") as file:
exec(file.read())