Skip to content

Commit

Permalink
Merge pull request bitcoin#12 from lateminer/remove-client-date
Browse files Browse the repository at this point in the history
build: Get rid of `CLIENT_DATE`
  • Loading branch information
janko33bd authored Jan 6, 2018
2 parents 2b915f6 + 106eaff commit c71b057
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 19 deletions.
7 changes: 0 additions & 7 deletions share/genbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ fi

DESC=""
SUFFIX=""
LAST_COMMIT_DATE=""
if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
# clean 'dirty' status of touched files that haven't been modified
git diff >/dev/null 2>/dev/null
Expand All @@ -29,9 +28,6 @@ if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/
# otherwise generate suffix from git, i.e. string like "59887e8-dirty"
SUFFIX=$(git rev-parse --short HEAD)
git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty"

# get a string like "2012-04-10 16:27:19 +0200"
LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")"
fi

if [ -n "$DESC" ]; then
Expand All @@ -45,7 +41,4 @@ fi
# only update build.h if necessary
if [ "$INFO" != "$NEWINFO" ]; then
echo "$NEWINFO" >"$FILE"
if [ -n "$LAST_COMMIT_DATE" ]; then
echo "#define BUILD_DATE \"$LAST_COMMIT_DATE\"" >> "$FILE"
fi
fi
9 changes: 0 additions & 9 deletions src/clientversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,7 @@ const std::string CLIENT_NAME("Satoshi");
#endif
#endif

#ifndef BUILD_DATE
#ifdef GIT_COMMIT_DATE
#define BUILD_DATE GIT_COMMIT_DATE
#else
#define BUILD_DATE __DATE__ ", " __TIME__
#endif
#endif

const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX);
const std::string CLIENT_DATE(BUILD_DATE);

static std::string FormatVersion(int nVersion)
{
Expand Down
1 change: 0 additions & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ static const int CLIENT_VERSION =

extern const std::string CLIENT_NAME;
extern const std::string CLIENT_BUILD;
extern const std::string CLIENT_DATE;


std::string FormatFullVersion();
Expand Down
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ void InitLogging()
fLogIPs = GetBoolArg("-logips", DEFAULT_LOGIPS);

LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
LogPrintf("Bitcoin version %s (%s)\n", FormatFullVersion(), CLIENT_DATE);
LogPrintf("Bitcoin version %s\n", FormatFullVersion());
}

/** Initialize bitcoin.
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/rpcdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ UniValue dumpwallet(const UniValue& params, bool fHelp)
std::sort(vKeyBirth.begin(), vKeyBirth.end());

// produce output
file << strprintf("# Wallet dump created by Bitcoin %s (%s)\n", CLIENT_BUILD, CLIENT_DATE);
file << strprintf("# Wallet dump created by Bitcoin %s\n", CLIENT_BUILD);
file << strprintf("# * Created on %s\n", EncodeDumpTime(GetTime()));
file << strprintf("# * Best block at time of backup was %i (%s),\n", chainActive.Height(), chainActive.Tip()->GetBlockHash().ToString());
file << strprintf("# mined on %s\n", EncodeDumpTime(chainActive.Tip()->GetBlockTime()));
Expand Down

0 comments on commit c71b057

Please sign in to comment.