summaryrefslogtreecommitdiff
path: root/include/siri/version.h
blob: ed237fe540fb975a8a9793b0ba8f74a7b3b15bfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * version.h - SiriDB version info.
 */
#ifndef SIRI_VERSION_H_
#define SIRI_VERSION_H_

#define SIRIDB_VERSION_MAJOR 2
#define SIRIDB_VERSION_MINOR 0
#define SIRIDB_VERSION_PATCH 48

/*
 * Use SIRIDB_VERSION_PRE_RELEASE for alpha release versions.
 * This should be an empty string when building a final release.
 * Examples: "-alpha-0" "-alpha-1", ""
 * Note that debian alpha packages should use versions like this:
 *   2.0.34-0alpha0
 */
#define SIRIDB_VERSION_PRE_RELEASE ""

#ifndef NDEBUG
#define SIRIDB_VERSION_BUILD_RELEASE "+debug"
#else
#define SIRIDB_VERSION_BUILD_RELEASE ""
#endif

#define SIRIDB_STRINGIFY(num) #num
#define SIRIDB_VERSION_STR(major,minor,patch) \
    SIRIDB_STRINGIFY(major) "." \
    SIRIDB_STRINGIFY(minor) "." \
    SIRIDB_STRINGIFY(patch)

#define SIRIDB_VERSION SIRIDB_VERSION_STR( \
        SIRIDB_VERSION_MAJOR, \
        SIRIDB_VERSION_MINOR, \
        SIRIDB_VERSION_PATCH) \
        SIRIDB_VERSION_PRE_RELEASE \
        SIRIDB_VERSION_BUILD_RELEASE

#define SIRIDB_CONTRIBUTERS \
    "https://github.com/SiriDB/siridb-server/contributors"
#define SIRIDB_HOME_PAGE \
    "https://siridb.net"

int siri_version_cmp(const char * version_a, const char * version_b);

/* SiriDB can only connect with servers having at least this version. */
#define SIRIDB_MINIMAL_VERSION "2.0.0"

#endif  /* SIRI_VERSION_H_ */