Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
chore: remove usages of rdsn git commit (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wu Tao authored Sep 7, 2020
1 parent fafbd59 commit 4f4ba53
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ install/
test_reports/
Dockerfile
include/thrift/
include/dsn/git_commit.h
DSN_ROOT

rdsn.github.config
Expand Down
17 changes: 0 additions & 17 deletions scripts/linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,6 @@ then
cd ..
fi

cd $ROOT
DSN_GIT_COMMIT=`git log | head -n 1 | awk '{print $2}'`
if [ $? -ne 0 ] || [ -z "$DSN_GIT_COMMIT" ]
then
echo "ERROR: get DSN_GIT_COMMIT failed"
echo "HINT: check if rdsn is a git repo"
echo " or check gitdir in .git (edit it or use \"git --git-dir='../.git/modules/rdsn' log\" to get commit)"
exit 1
fi
GIT_COMMIT_FILE=include/dsn/git_commit.h
if [ ! -f $GIT_COMMIT_FILE ] || ! grep $DSN_GIT_COMMIT $GIT_COMMIT_FILE
then
echo "Generating $GIT_COMMIT_FILE..."
echo "#pragma once" >$GIT_COMMIT_FILE
echo "#define DSN_GIT_COMMIT \"$DSN_GIT_COMMIT\"" >>$GIT_COMMIT_FILE
fi

cd $BUILD_DIR
echo "[$(date)] Building..."
make install $MAKE_OPTIONS
Expand Down
12 changes: 0 additions & 12 deletions src/runtime/core_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,6 @@ void dsn_core_init()
}

#if defined(__linux__)
#include <dsn/git_commit.h>
#define STR_I(var) #var
#define STR(var) STR_I(var)
static char const rcsid[] =
"$Version: rDSN (" DSN_GIT_COMMIT ")"
#if defined(DSN_BUILD_TYPE)
" " STR(DSN_BUILD_TYPE)
#endif
", built by gcc " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__)
#if defined(DSN_BUILD_HOSTNAME)
", built on " STR(DSN_BUILD_HOSTNAME)
#endif
", built at " __DATE__ " " __TIME__ " $";
const char *dsn_rcsid() { return rcsid; }
#endif

0 comments on commit 4f4ba53

Please sign in to comment.