mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 13:08:33 +00:00
version: generate "build number" from commit timestamp
- cmake: git_timestamp() returns last commit time formatted as `YYYYMMddHHmm`. - Always include commit hash in :version and --version output. `nvim --version` sample output: NVIM 0.0.0-alpha+201410070245 (compiled Oct 7 2014 05:30:45) Commit: f747b2b1ff7bfe7eb00cc2be82d7af87c98f1111
This commit is contained in:
@@ -27,11 +27,13 @@
|
||||
#ifndef NVIM_VERSION_BUILD
|
||||
#define NVIM_VERSION_BUILD
|
||||
#endif
|
||||
#ifndef NVIM_VERSION_COMMIT
|
||||
#define NVIM_VERSION_COMMIT
|
||||
#endif
|
||||
// for the startup-screen
|
||||
#define NVIM_VERSION_MEDIUM STR(NVIM_VERSION_MAJOR) "." STR(NVIM_VERSION_MINOR)
|
||||
// for the ":version" command and "nvim -h"
|
||||
#define NVIM_VERSION_LONG "NVIM " NVIM_VERSION_MEDIUM "." STR(NVIM_VERSION_PATCH) NVIM_VERSION_PRERELEASE NVIM_VERSION_BUILD
|
||||
#define NVIM_VERSION_LONG_DATE NVIM_VERSION_LONG " (compiled "
|
||||
|
||||
//
|
||||
// Vim version number, name, etc. Patchlevel is defined in version.c.
|
||||
|
Reference in New Issue
Block a user