-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathversion_impl.cpp.in
More file actions
40 lines (34 loc) · 1.53 KB
/
version_impl.cpp.in
File metadata and controls
40 lines (34 loc) · 1.53 KB
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
/**
* \warning This file is machine generated. DO NOT EDIT. See version_impl.cpp.in for changes.
*/
#include "version_impl.hpp"
namespace eosio { namespace version {
const std::string version_major {"@_VERSION_MAJOR_@" };
const std::string version_minor {"@_VERSION_MINOR_@" };
const std::string version_patch {"@_VERSION_PATCH_@" };
const std::string version_suffix{"@_VERSION_SUFFIX_@"};
const std::string version_hash {"@_VERSION_HASH_@" };
const bool version_dirty { @_VERSION_DIRTY_@ };
std::string _version_client() {
if( version_major == "unknown" || version_major.empty() || version_minor == "unknown" || version_minor.empty()) {
return "unknown";
} else {
std::string version{'v' + version_major + '.' + version_minor};
if( !version_patch.empty() ) version += '.' + version_patch;
if( !version_suffix.empty() ) version += '-' + version_suffix;
return version;
}
}
std::string _version_full() {
if( version_major == "unknown" || version_major.empty() || version_minor == "unknown" || version_minor.empty()) {
return "unknown";
} else {
std::string version{'v' + version_major + '.' + version_minor};
if( !version_patch.empty() ) version += '.' + version_patch;
if( !version_suffix.empty() ) version += '-' + version_suffix;
if( !version_hash.empty() ) version += '-' + version_hash;
if( version_dirty ) version += "-dirty";
return version;
}
}
} }