Use version defined in Makefile in rocksdb_build_git_sha

Summary: Now rocksdb_build_git_sha is determined from "git sha". It is hard if the release is not from the repository directly but from a source code copy. Change to use the versions given in Makefile.

Test Plan: Run "make util/build_version.cc"

Reviewers: kradhakrishnan, rven, meyering, igor

Reviewed By: igor

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D38451
This commit is contained in:
sdong 2015-05-13 14:32:47 -07:00
parent 5aad881298
commit 8c52788f0c

View file

@ -177,12 +177,12 @@ CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverl
LDFLAGS += $(PLATFORM_LDFLAGS)
date := $(shell date +%F)
git_sha := $(shell git describe HEAD 2>/dev/null)
git_sha := $(shell git rev-parse HEAD 2>/dev/null)
gen_build_version = \
printf '%s\n' \
'\#include "build_version.h"' \
'const char* rocksdb_build_git_sha = \
"rocksdb_build_git_sha:$(git_sha)";' \
"rocksdb_build_git_sha:$(git_sha)";' \
'const char* rocksdb_build_git_date = \
"rocksdb_build_git_date:$(date)";' \
'const char* rocksdb_build_compile_date = __DATE__;'