]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
FORCE_GIT_SHA
authorIgor Canadi <icanadi@fb.com>
Tue, 19 May 2015 18:45:01 +0000 (11:45 -0700)
committerIgor Canadi <icanadi@fb.com>
Tue, 19 May 2015 18:45:01 +0000 (11:45 -0700)
Summary: In third-party2 build we need to force git sha because we're compiling from a different git repositry.

Test Plan: `FORCE_GIT_SHA=igor make`

Reviewers: kradhakrishnan, sdong

Reviewed By: kradhakrishnan

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D38679

Makefile

index 8fa9fdf7eea769087bd08f097d68fc4184f27207..0afa377a8461419aa97ce0251baffe8c1b5e78a6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -177,7 +177,11 @@ CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverl
 LDFLAGS += $(PLATFORM_LDFLAGS)
 
 date := $(shell date +%F)
-git_sha := $(shell git rev-parse HEAD 2>/dev/null)
+ifdef FORCE_GIT_SHA
+       git_sha := $(FORCE_GIT_SHA)
+else
+       git_sha := $(shell git rev-parse HEAD 2>/dev/null)
+endif
 gen_build_version =                                                    \
   printf '%s\n'                                                                \
     '\#include "build_version.h"'                                      \