stoneatom / stonedb

StoneDB is an Open-Source MySQL HTAP and MySQL-Native DataBase for OLTP, Real-Time Analytics, a counterpart of MySQLHeatWave. (https://stonedb.io)
https://stonedb.io/
GNU General Public License v2.0
862 stars 139 forks source link

bug: debug version information is displayed incorrectly #1844

Open davidshiz opened 1 year ago

davidshiz commented 1 year ago

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

Describe the problem

It is already version v1.0.3, why now it is still v1.0.1

[root@stonedb-test tianmu_data]# /stonedb57/install/bin/mysqld --version
/stonedb57/install/bin/mysqld  Ver 5.7.36-StoneDB-v1.0.1.2579bd4 for Linux on x86_64 (build-)
build information as follow:
        Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
        Branch name: stonedb-5.7-dev
        Last commit ID: 2579bd4
        Last commit time: Date:   Thu May 25 14:51:43 2023 +0800
        Build time: Date: Tue May 30 17:15:15 UTC 2023
[root@stonedb-test tianmu_data]# /stonedb57/install/bin/mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1289
Server version: 5.7.36-StoneDB-v1.0.1.2579bd4 build-

Copyright (c) 2021, 2022 StoneAtom Group Holding Limited
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select version();
+-------------------------------+
| version()                     |
+-------------------------------+
| 5.7.36-StoneDB-v1.0.1.2579bd4 |
+-------------------------------+
1 row in set (0.00 sec)

Expected behavior

No response

How To Reproduce

No response

Environment

No response

Are you interested in submitting a PR to solve the problem?

davidshiz commented 1 year ago

release version also has the problem

chenshengjiang commented 1 year ago

v1.0.1 is value of STONEDB_TAG_NAME which set int CMakeLists.txt use command git describe --tags `git rev-list --tags --max-count=1` |head -n 1 |awk -F'-' '{print $2}'

RingsC commented 1 year ago

STONEDB_TAG_NAME

When we tagged a tag to stonedb, we set this variable to a proper name mannually.

chenshengjiang commented 1 year ago

git describe --tags `git rev-list --tags --max-count=1`

This command will get the latest tag through all branches, thus it will return 8.0-v1.0.1-alpha