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
main
sdong 10 years ago
parent 5aad881298
commit 8c52788f0c
  1. 4
      Makefile

@ -177,12 +177,12 @@ CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverl
LDFLAGS += $(PLATFORM_LDFLAGS) LDFLAGS += $(PLATFORM_LDFLAGS)
date := $(shell date +%F) 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 = \ gen_build_version = \
printf '%s\n' \ printf '%s\n' \
'\#include "build_version.h"' \ '\#include "build_version.h"' \
'const char* rocksdb_build_git_sha = \ 'const char* rocksdb_build_git_sha = \
"rocksdb_build_git_sha:$(git_sha)";' \ "rocksdb_build_git_sha:$(git_sha)";' \
'const char* rocksdb_build_git_date = \ 'const char* rocksdb_build_git_date = \
"rocksdb_build_git_date:$(date)";' \ "rocksdb_build_git_date:$(date)";' \
'const char* rocksdb_build_compile_date = __DATE__;' 'const char* rocksdb_build_compile_date = __DATE__;'

Loading…
Cancel
Save