2
2
spegling av https://github.com/Hilbis/Hilbish synced 2025-07-15 15:22:03 +00:00

feat: add hilbish.version interface

This commit is contained in:
TorchedSammy 2022-05-17 06:39:30 -04:00
förälder 5dd2af7250
incheckning ab8b9c8376
Signerad av: sammyette
GPG-nyckel ID: 904FC49417B44DCD

8
api.go
Visa fil

@ -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
}