mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Retire engine Tag
It is somewhat redundant and could make SF name too long, so use just Version, in case of a signature build Version will be set to 'sig-xxx' otherwise, if left empty, we fall back on usual date stamp. No functional change.
This commit is contained in:
parent
3f64a2af6a
commit
5b7b330616
2 changed files with 5 additions and 9 deletions
|
@ -427,7 +427,7 @@ signature-build:
|
|||
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) all
|
||||
@echo "Running benchmark for getting the signature ..."
|
||||
@$(SIGNBENCH) 2>&1 | grep 'Nodes searched' | grep -o ": .*" | tr -d ': ' > sign.txt
|
||||
@sed -i -e 's,^,/static const string Tag/s/"\\(.*\\)"/",1' -e 's,$$,"/1,1' sign.txt
|
||||
@sed -i -e 's,^,/static const string Version/s/"\\(.*\\)"/"sig-,1' -e 's,$$,"/1,1' sign.txt
|
||||
@sed -i -f sign.txt misc.cpp
|
||||
@rm sign.txt
|
||||
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) all
|
||||
|
|
12
src/misc.cpp
12
src/misc.cpp
|
@ -30,11 +30,9 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
/// Version number. If Version is left empty, then Tag plus current
|
||||
/// date, in the format DD-MM-YY, are used as a version number.
|
||||
|
||||
/// Version number. If Version is left empty, then compile date, in the
|
||||
/// format DD-MM-YY, is shown in engine_info.
|
||||
static const string Version = "";
|
||||
static const string Tag = "";
|
||||
|
||||
|
||||
/// engine_info() returns the full name of the current Stockfish version. This
|
||||
|
@ -48,14 +46,12 @@ const string engine_info(bool to_uci) {
|
|||
string month, day, year;
|
||||
stringstream s, date(__DATE__); // From compiler, format is "Sep 21 2008"
|
||||
|
||||
s << "Stockfish " << Version;
|
||||
s << "Stockfish " << Version << setfill('0');
|
||||
|
||||
if (Version.empty())
|
||||
{
|
||||
date >> month >> day >> year;
|
||||
|
||||
s << Tag << string(Tag.empty() ? "" : " ") << setfill('0') << setw(2) << day
|
||||
<< setw(2) << (1 + months.find(month) / 4) << year.substr(2);
|
||||
s << setw(2) << day << setw(2) << (1 + months.find(month) / 4) << year.substr(2);
|
||||
}
|
||||
|
||||
s << (Is64Bit ? " 64" : "")
|
||||
|
|
Loading…
Add table
Reference in a new issue