Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xindoo
redis
提交
5436146c
R
redis
项目概览
xindoo
/
redis
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5436146c
编写于
5月 17, 2010
作者:
P
Pieter Noordhuis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
create release.h in make process and add this information to INFO listing
上级
26ef09a8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
1 deletion
+14
-1
.gitignore
.gitignore
+1
-0
Makefile
Makefile
+8
-1
redis.c
redis.c
+5
-0
未找到文件。
.gitignore
浏览文件 @
5436146c
...
...
@@ -12,3 +12,4 @@ mkrelease.sh
release
myredis.conf
misc/*
release.h
Makefile
浏览文件 @
5436146c
...
...
@@ -14,6 +14,8 @@ endif
CCOPT
=
$(CFLAGS)
$(CCLINK)
$(ARCH)
$(PROF)
DEBUG
?=
-g
-rdynamic
-ggdb
GIT_SHA1
:=
$(
shell
sh
-c
'(git show-ref --head --hash=8 2> /dev/null || echo 00000000
)
| head -n1'
)
GIT_DIRTY
:=
$(
shell
sh
-c
'git status -s 2> /dev/null | wc -l'
)
OBJ
=
adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o
BENCHOBJ
=
ae.o anet.o redis-benchmark.o sds.o adlist.o zmalloc.o
CLIOBJ
=
anet.o sds.o adlist.o redis-cli.o zmalloc.o linenoise.o
...
...
@@ -54,7 +56,7 @@ sds.o: sds.c sds.h zmalloc.h
zipmap.o
:
zipmap.c zmalloc.h
zmalloc.o
:
zmalloc.c config.h
redis-server
:
$(OBJ)
redis-server
:
releaseheader
$(OBJ)
$(CC)
-o
$(PRGNAME)
$(CCOPT)
$(DEBUG)
$(OBJ)
@
echo
""
@
echo
"Hint: To run the test-redis.tcl script is a good idea."
...
...
@@ -74,6 +76,11 @@ redis-check-dump: $(CHECKDUMPOBJ)
redis-check-aof
:
$(CHECKAOFOBJ)
$(CC)
-o
$(CHECKAOFPRGNAME)
$(CCOPT)
$(DEBUG)
$(CHECKAOFOBJ)
releaseheader
:
@
echo
"#define REDIS_GIT_SHA1
\"
$(GIT_SHA1)
\"
"
>
release.h
@
echo
"#define REDIS_GIT_DIRTY
$(GIT_DIRTY)
"
>>
release.h
@
touch
redis.c
# force recompile of redis.c
.c.o
:
$(CC)
-c
$(CFLAGS)
$(DEBUG)
$(COMPILE_TIME)
$<
...
...
redis.c
浏览文件 @
5436146c
...
...
@@ -76,6 +76,7 @@
#include "pqsort.h"
/* Partial qsort for SORT+LIMIT */
#include "zipmap.h"
/* Compact dictionary-alike data structure */
#include "sha1.h"
/* SHA1 is used for DEBUG DIGEST */
#include "release.h"
/* Release and/or git repository information */
/* Error codes */
#define REDIS_OK 0
...
...
@@ -7175,6 +7176,8 @@ static sds genRedisInfoString(void) {
bytesToHuman
(
hmem
,
zmalloc_used_memory
());
info
=
sdscatprintf
(
sdsempty
(),
"redis_version:%s
\r\n
"
"redis_git_sha1:%s
\r\n
"
"redis_git_dirty:%d
\r\n
"
"arch_bits:%s
\r\n
"
"multiplexing_api:%s
\r\n
"
"process_id:%ld
\r\n
"
...
...
@@ -7199,6 +7202,8 @@ static sds genRedisInfoString(void) {
"vm_enabled:%d
\r\n
"
"role:%s
\r\n
"
,
REDIS_VERSION
,
REDIS_GIT_SHA1
,
REDIS_GIT_DIRTY
>
0
,
(
sizeof
(
long
)
==
8
)
?
"64"
:
"32"
,
aeGetApiName
(),
(
long
)
getpid
(),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录