git: store git short ref hash on build stage to Version.h
This commit is contained in:
parent
d82a1c5225
commit
e04c8ee95e
2 changed files with 14 additions and 0 deletions
|
|
@ -8,11 +8,13 @@ namespace Pinetime {
|
|||
static constexpr uint32_t Major() {return major;}
|
||||
static constexpr uint32_t Minor() {return minor;}
|
||||
static constexpr uint32_t Patch() {return patch;}
|
||||
static constexpr const char* GitCommitHash() {return commitHash;}
|
||||
static constexpr const char* VersionString() {return versionString;}
|
||||
private:
|
||||
static constexpr uint32_t major = @PROJECT_VERSION_MAJOR@;
|
||||
static constexpr uint32_t minor = @PROJECT_VERSION_MINOR@;
|
||||
static constexpr uint32_t patch = @PROJECT_VERSION_PATCH@;
|
||||
static constexpr const char* commitHash = "@PROJECT_GIT_COMMIT_HASH@";
|
||||
static constexpr const char* versionString = "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue