packit/plans/git_reference.py
Packit a09edb00a0 [packit] 0.93.0 upstream release
Upstream tag: 0.93.0
Upstream commit: 90bcee10
2024-02-26 11:49:47 +00:00

17 lines
436 B
Python

#!/usr/bin/python
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
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()
)