packit/plans/git_reference.py
Packit 8a28ce3161 [packit] 0.81.0 upstream release
Upstream tag: 0.81.0
Upstream commit: 134be17e
2023-09-23 11:25:02 +00:00

14 lines
356 B
Python

#!/usr/bin/python
import subprocess
from pathlib import Path
import fmf
tree_root = Path.cwd().absolute()
node = fmf.Tree(tree_root).find("/plans")
with node as data:
data["discover"]["url"] = "https://github.com/packit/packit.git"
data["discover"]["ref"] = (
subprocess.check_output(["git", "rev-parse", "HEAD"]).decode().strip()
)