You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw you're using Cobra as CLI framework (lovely one by the way).
How would you want to set rai's CLI versions ?
Two options comes in my mind:
Hard-coded in a version_current.go file (Hugo did this and it's easier to distribute for both devs and users)
At compile time using -ldflags="-X 'main.version=0.1.2-alpha'" (may be better if you think about CI automations but require to update both make file and README.md)
I agree with needing a --version flag which users will often expect, but it would also be good to have a version command that can show the version of the associated database and engine. That information should also make it clear whether or not the CLI, database, and engine are all compatible.
Activity
TeddyBear06 commentedon Jun 14, 2022
Hi,
I would be pleased to contribute on this one.
I saw you're using Cobra as CLI framework (lovely one by the way).
How would you want to set rai's CLI versions ?
Two options comes in my mind:
version_current.go
file (Hugo did this and it's easier to distribute for both devs and users)-ldflags="-X 'main.version=0.1.2-alpha'"
(may be better if you think about CI automations but require to update bothmake
file andREADME.md
)Cobra support "out of the box" version command flags by injecting a
Version
:var root = &cobra.Command{Use: "rai", Version: version}
Then we can get rai's version using both
-v
or--version
flags:I'll send a pull request with a working POC in order to share my POV about this question.
RelationalAI#3 Proposal to print rai version
andy-dean-rai commentedon Aug 23, 2022
This feature would have been helpful for me today.
andy-dean-rai commentedon Sep 1, 2022
I agree with needing a --version flag which users will often expect, but it would also be good to have a version command that can show the version of the associated database and engine. That information should also make it clear whether or not the CLI, database, and engine are all compatible.
torkins commentedon Oct 7, 2022
All SDKs and CLI,
Plan is to go with generated version.go or lang equivalent for this
billscheidel-rai commentedon Dec 6, 2022
Note: This issue has been migrated to https://relationalai.atlassian.net/browse/RAI-4917.
This link is only accessible to employees of RelationalAI.