From b16ce8e0c41956df86dcb5e9566e23607584ec73 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Tue, 18 May 2021 13:05:54 +0200 Subject: [PATCH] L2SS-176: Make git version info usable from command line --- devices/util/lofar2_git.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devices/util/lofar2_git.py b/devices/util/lofar2_git.py index cab320ad7..b67e95029 100644 --- a/devices/util/lofar2_git.py +++ b/devices/util/lofar2_git.py @@ -31,3 +31,6 @@ def get_version(repo: git.Repo = None) -> str: repo = get_repo() return "{} [{}{}]".format(repo.active_branch, repo.commit(), " (dirty)" if repo.is_dirty() else "") + +if __name__ == "__main__": + print(get_version()) -- GitLab