This adds version number generation in the build system. Version numbers follow the format: <version>-<release> where release consists of: <date>-<git-hash> The version and release numbers are generated by the SCYLLA-VERSION-GEN script and they are stored in SCYLLA-VERSION-FILE and SCYLLA-RELEASE-FILE files so that other parts of the build system can easily pick them up. For builds that happen from release tarballs, for example, SCYLLA-VERSION-GEN looks for a "version" file in the tree and just uses that. Basically, we're doing pretty much the same as Git is doing in its build system. Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
16 lines
326 B
C++
16 lines
326 B
C++
/*
|
|
* Copyright (C) 2015 Cloudius Systems, Ltd.
|
|
*/
|
|
|
|
#include "version.hh"
|
|
|
|
#include <seastar/core/print.hh>
|
|
|
|
static const char scylla_version_str[] = SCYLLA_VERSION;
|
|
static const char scylla_release_str[] = SCYLLA_RELEASE;
|
|
|
|
std::string scylla_version()
|
|
{
|
|
return sprint("%s-%s", scylla_version_str, scylla_release_str);
|
|
}
|