packit/plans/git_reference.py
Nikola Forró 52cafe5526 [packit] 0.30.0 upstream release
Upstream tag: 0.30.0
Upstream commit: 7b837707

Signed-off-by: Nikola Forró <nforro@redhat.com>
2022-10-03 12:47:31 +02:00

13 lines
355 B
Python

#!/usr/bin/python
import fmf
from pathlib import Path
import subprocess
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()
)