From ab8b9c8376179f152be0f9316522f74d9462edf2 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Tue, 17 May 2022 06:39:30 -0400 Subject: [PATCH] feat: add hilbish.version interface --- api.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api.go b/api.go index be0ed4d..9289305 100644 --- a/api.go +++ b/api.go @@ -174,6 +174,14 @@ Check out the {blue}{bold}guide{reset} command to get started. util.Document(editorModule, "") mod.Set(rt.StringValue("editor"), rt.TableValue(editorModule)) + versionModule := rt.NewTable() + util.SetField(rtm, versionModule, "branch", rt.StringValue(gitBranch), "Git branch Hilbish was compiled from") + util.SetField(rtm, versionModule, "full", rt.StringValue(getVersion()), "Full version info, including release name") + util.SetField(rtm, versionModule, "commit", rt.StringValue(gitCommit), "Git commit Hilbish was compiled from") + util.SetField(rtm, versionModule, "release", rt.StringValue(releaseName), "Release name") + util.Document(versionModule, "Version info interface.") + mod.Set(rt.StringValue("version"), rt.TableValue(versionModule)) + return rt.TableValue(fakeMod), nil }