
New info information to be used to determine the valkey versioning info. Internally, introduce new define values for "SERVER_VERSION" which is different from the Redis compatibility version, "REDIS_VERSION". Add two new info fields: `server_version`: The Valkey server version `server_name`: Indicates that the server is valkey. Add one new RDB field: `server_ver`, which indicates the valkey version that produced the server. Add 3 new LUA globals: `SERVER_VERSION_NUM`, `SERVER_VERSION`, and `SERVER_NAME`. Which reflect the valkey version instead of the Redis compatibility version. Also clean up various places where Redis and configuration was being used that is no longer necessary. --------- Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
17 lines
916 B
Bash
Executable File
17 lines
916 B
Bash
Executable File
#!/bin/sh
|
|
GIT_SHA1=`(git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1`
|
|
GIT_DIRTY=`git diff --no-ext-diff -- ../src ../deps 2> /dev/null | wc -l`
|
|
BUILD_ID=`uname -n`"-"`date +%s`
|
|
if [ -n "$SOURCE_DATE_EPOCH" ]; then
|
|
BUILD_ID=$(date -u -d "@$SOURCE_DATE_EPOCH" +%s 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" +%s 2>/dev/null || date -u +%s)
|
|
fi
|
|
test -f release.h || touch release.h
|
|
(cat release.h | grep SHA1 | grep $GIT_SHA1) && \
|
|
(cat release.h | grep DIRTY | grep $GIT_DIRTY) && exit 0 # Already up-to-date
|
|
echo "#define REDIS_GIT_SHA1 \"$GIT_SHA1\"" > release.h
|
|
echo "#define REDIS_GIT_DIRTY \"$GIT_DIRTY\"" >> release.h
|
|
echo "#define REDIS_BUILD_ID \"$BUILD_ID\"" >> release.h
|
|
echo "#include \"version.h\"" >> release.h
|
|
echo "#define REDIS_BUILD_ID_RAW SERVER_NAME SERVER_VERSION REDIS_BUILD_ID REDIS_GIT_DIRTY REDIS_GIT_SHA1" >> release.h
|
|
touch release.c # Force recompile of release.c
|