Opened 5 years ago
Closed 5 years ago
#2291 closed enhancement (fixed)
all executable programs to output version nunmber
Reported by: | Dimitar Misev | Owned by: | apercov |
---|---|---|---|
Priority: | major | Milestone: | 10.0 |
Component: | bin | Version: | 9.8 |
Keywords: | Cc: | Peter Baumann, Bang Pham Huu | |
Complexity: | Medium |
Description
This affects all binary executables, war files, scripts (bash, python, etc). Depending on the use, the message will have to appear
- in the corresponding log file
- on command line standard output
Standard syntax:
{component name} {version} [ build {git-commit-id} ]
examples:
rasserver v9.8.0 build b63c3821a petascope v9.8.0 build b63c3821a wcst_import.sh v9.8.0 build b63c3821a
The {git-commit-id} should only be embedded when compiling in release mode (-DCMAKE_BUILD_TYPE=Release), to avoid unnecessary recompilation during development.
Change History (13)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Good progress! Actually, all command line tools need to output a start and end message anyway - with rasql, for example, that has been there earlier. As part of this, the version number can be printed. A dated example:
rasql: rasdaman query tool v1.0, rasdaman v6 -- generated on 26.06.2007 23:38:15. ... rasql terminated.
For suppressing such a message (eg, for script chaining) you can avoid all extra output in rasql with —quiet: "print no ornament messages, only results and errors"
comment:3 by , 5 years ago
This is still printed by rasql, but only when executing a query; it's not shown with rasql --help
for example.
$ rasql -q 'select version()' --out string rasql: rasdaman query tool v1.0, rasdaman 10.0.0. Opening database RASBASE at 127.0.0.1:7001... ok. Executing retrieval query... ok. Query result collection has 1 element(s): Result object 1: rasdaman 10.0.0 on x86_64-linux-gnu, compiled by g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008 rasql done.
I'm not sure if the v1.0 is needed here though, I wouldn't think it needs its own version in addition to rasdaman's version.
comment:4 by , 5 years ago
oops, admittedly I tried only with the help option. My bad. But that is the role model for all our tools that (can) output text.
comment:5 by , 5 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
To summarize what is left to do:
rasql --help
should print something like this at the top of output (the same as when you execute a query withrasql -q
:rasql: rasdaman query tool v1.0, rasdaman 10.0.0.
- the same should be done for
rasserver --help
andrasmgr --help
comment:6 by , 5 years ago
…and also without --help
. Note that rasql has a parametr —quiet to suppress if desirable;server tools don't need that.
comment:7 by , 5 years ago
Status: | assigned → accepted |
---|
comment:8 by , 5 years ago
What python, java and any other from shell and c++ scripts should get this message?
follow-up: 10 comment:9 by , 5 years ago
Only those that are installed when you do make install.
So check what's in the $RMANHOME/bin directory, where $RMANHOME is the installation directory of rasdaman.
comment:10 by , 5 years ago
Replying to Dimitar Misev:
Only those that are installed when you do make install.
So check what's in the $RMANHOME/bin directory, where $RMANHOME is the installation directory of rasdaman.
bin directory doesn't have any java/python files, should we still add this to some of them?
comment:11 by , 5 years ago
Cc: | added |
---|
It was already done for the java components petascope and secore (Bang correct me if I'm wrong).
So only for those that are in the bin directory.
comment:12 by , 5 years ago
@Dimitar: Petacope has printed the correspondent rasdaman version in petascope.log, but not with SECORE.
comment:13 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Already fixed for the various scripts (start_rasdaman.sh, stop_rasdaman.sh, create_db.sh, update_db.sh, rasdaman_insertdemo.sh, petascope_insertdemo.sh).
wcst_import.sh provides an option to print the version, I think this is sufficient?