Skip to content

Commit 55ec1ee

Browse files
laanwjfurszy
authored andcommitted
build: Get rid of CLIENT_DATE
Putting the build date in the executable is a practice that has no place in these days, now that deterministic building is increasingly common. Continues bitcoin#7732 which did this for the GUI.
1 parent b22dc99 commit 55ec1ee

File tree

5 files changed

+2
-19
lines changed

5 files changed

+2
-19
lines changed

share/genbuild.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ git_check_in_repo() {
2424

2525
DESC=""
2626
SUFFIX=""
27-
LAST_COMMIT_DATE=""
2827
if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] && git_check_in_repo share/genbuild.sh; then
2928
# clean 'dirty' status of touched files that haven't been modified
3029
git diff >/dev/null 2>/dev/null
@@ -38,9 +37,6 @@ if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$(
3837
# otherwise generate suffix from git, i.e. string like "59887e8-dirty"
3938
SUFFIX=$(git rev-parse --short HEAD)
4039
git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty"
41-
42-
# get a string like "2012-04-10 16:27:19 +0200"
43-
LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")"
4440
fi
4541

4642
if [ -n "$DESC" ]; then
@@ -54,7 +50,4 @@ fi
5450
# only update build.h if necessary
5551
if [ "$INFO" != "$NEWINFO" ]; then
5652
echo "$NEWINFO" >"$FILE"
57-
if [ -n "$LAST_COMMIT_DATE" ]; then
58-
echo "#define BUILD_DATE \"$LAST_COMMIT_DATE\"" >> "$FILE"
59-
fi
6053
fi

src/clientversion.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,7 @@ const std::string CLIENT_NAME("PIVX Core");
6767
#endif
6868
#endif
6969

70-
#ifndef BUILD_DATE
71-
#ifdef GIT_COMMIT_DATE
72-
#define BUILD_DATE GIT_COMMIT_DATE
73-
#else
74-
#define BUILD_DATE __DATE__ ", " __TIME__
75-
#endif
76-
#endif
77-
7870
const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX);
79-
const std::string CLIENT_DATE(BUILD_DATE);
8071

8172
static std::string FormatVersion(int nVersion)
8273
{

src/clientversion.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ static const int CLIENT_VERSION =
4444

4545
extern const std::string CLIENT_NAME;
4646
extern const std::string CLIENT_BUILD;
47-
extern const std::string CLIENT_DATE;
4847

4948

5049
std::string FormatFullVersion();

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ void InitLogging()
10261026
#else
10271027
version_string += " (release build)";
10281028
#endif
1029-
LogPrintf("PIVX version %s (%s)\n", version_string, CLIENT_DATE);
1029+
LogPrintf("PIVX version %s\n", version_string);
10301030
}
10311031

10321032
bool AppInitParameterInteraction()

src/wallet/rpcdump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ UniValue dumpwallet(const JSONRPCRequest& request)
567567

568568
CBlockIndex* tip = chainActive.Tip();
569569
// produce output
570-
file << strprintf("# Wallet dump created by PIVX %s (%s)\n", CLIENT_BUILD, CLIENT_DATE);
570+
file << strprintf("# Wallet dump created by PIVX %s\n", CLIENT_BUILD);
571571
file << strprintf("# * Created on %s\n", FormatISO8601DateTime(GetTime()));
572572
if (tip) {
573573
file << strprintf("# * Best block at time of backup was %i (%s),\n", tip->nHeight,

0 commit comments

Comments
 (0)