Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
274e45e3
"vscode:/vscode.git/clone" did not exist on "fb4ee7f0c5ad81cae88a10587d5246a1b4f4dd84"
Commit
274e45e3
authored
May 18, 2010
by
antirez
Browse files
build fixed when simpler shells are used to create release.h
parent
a42453a5
Changes
2
Show whitespace changes
Inline
Side-by-side
mkreleasehdr.sh
View file @
274e45e3
#!/bin/sh
#!/bin/sh
GIT_SHA1
=
$(
(
git show-ref
--
head
--
hash
=
8
2
>
/
dev/null
||
echo
00000000
)
|
head
-
n1
)
GIT_SHA1
=
$(
git show-ref
--head
--hash
=
8 2> /dev/null |
head
-n1
)
GIT_DIRTY
=
$(
git diff 2> /dev/null |
wc
-l
)
GIT_DIRTY
=
$(
git diff 2> /dev/null |
wc
-l
)
test
-f
release.h
||
touch
release.h
test
-f
release.h
||
touch
release.h
(
cat
release.h |
grep
SHA1 |
grep
$GIT_SHA1
)
&&
\
(
cat
release.h |
grep
SHA1 |
grep
$GIT_SHA1
)
&&
\
(
cat
release.h |
grep
DIRTY |
grep
$GIT_DIRTY
)
&&
exit
0
# Already uptodate
(
cat
release.h |
grep
DIRTY |
grep
$GIT_DIRTY
)
&&
exit
0
# Already uptodate
echo
"#define REDIS_GIT_SHA1
\"
$GIT_SHA1
\"
"
>
release.h
echo
"#define REDIS_GIT_SHA1
\"
$GIT_SHA1
\"
"
>
release.h
echo
"#define REDIS_GIT_DIRTY
$GIT_DIRTY
"
>>
release.h
echo
"#define REDIS_GIT_DIRTY
\"
$GIT_DIRTY
\"
"
>>
release.h
touch
redis.c
# force recompile of redis.c
touch
redis.c
# force recompile of redis.c
redis.c
View file @
274e45e3
...
@@ -7203,7 +7203,7 @@ static sds genRedisInfoString(void) {
...
@@ -7203,7 +7203,7 @@ static sds genRedisInfoString(void) {
"role:%s\r\n"
"role:%s\r\n"
,REDIS_VERSION,
,REDIS_VERSION,
REDIS_GIT_SHA1,
REDIS_GIT_SHA1,
REDIS_GIT_DIRTY > 0,
strtol(
REDIS_GIT_DIRTY
,NULL,10)
> 0,
(sizeof(long) == 8) ? "64" : "32",
(sizeof(long) == 8) ? "64" : "32",
aeGetApiName(),
aeGetApiName(),
(long) getpid(),
(long) getpid(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment