python-specfile/plans/git_reference.py
Nikola Forró d2678f28f1 [packit] 0.6.0 upstream release
Upstream tag: 0.6.0
Upstream commit: 42dc2924

Signed-off-by: Nikola Forró <nforro@redhat.com>
2022-08-31 15:25:54 +02:00

14 lines
358 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/specfile.git"
data["discover"]["ref"] = (
subprocess.check_output(["git", "rev-parse", "HEAD"]).decode().strip()
)