packit/plans/git_reference.py
Frantisek Lachman 028a4a2a16 [packit] 0.31.0 upstream release
Upstream tag: 0.31.0
Upstream commit: a9bdeac4

Signed-off-by: Frantisek Lachman <flachman@redhat.com>
2021-05-31 14:04:18 +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()
)