File tree Expand file tree Collapse file tree 4 files changed +17
-13
lines changed Expand file tree Collapse file tree 4 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -135,15 +135,19 @@ git -C . rev-parse > /dev/null 2>&1
135
135
if [ 0 == $? ] ; then
136
136
# this is git
137
137
IS_GIT=1
138
- USE_GIT=1
139
- GET_VERSION=${SCRIPT_DIR}/gitversion.pm
140
- GET_VERSION_EXE=${SCRIPT_DIR}/gitversion
141
- ANNOTATE=${SCRIPT_DIR}/gitblame.pm
142
138
else
143
139
p4 have ... > /dev/null 2 >&1
144
140
if [ 0 == $? ] ; then
145
141
IS_P4=1
146
142
fi
143
+ fi
144
+
145
+ if [ " $IS_GIT" == 1 ] || [ " $IS_P4" == 0 ] ; then
146
+ USE_GIT=1
147
+ GET_VERSION=${SCRIPT_DIR}/gitversion.pm
148
+ GET_VERSION_EXE=${SCRIPT_DIR}/gitversion
149
+ ANNOTATE=${SCRIPT_DIR}/gitblame.pm
150
+ else
147
151
USE_P4=1
148
152
GET_VERSION=${SCRIPT_DIR}/getp4version
149
153
GET_VERSION_EXE=${SCRIPT_DIR}/getp4version
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ if [ 0 != $? ] ; then
248
248
exit 1
249
249
fi
250
250
fi
251
- grep -E " #.* user:.+ $USER " context_comment.info
251
+ grep " # user: $USER " context_comment.info
252
252
if [ 0 != $? ] ; then
253
253
echo " Error: did not find context data in comment field"
254
254
if [ $KEEP_GOING == 0 ] ; then
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ if [[ 1 == $CLEAN_ONLY ]] ; then
11
11
fi
12
12
13
13
# is this git or P4?
14
- if [ 1 == " $USE_GIT " ] ; then
14
+ if [ 1 == " $USE_P4 " ] ; then
15
+ GET_VERSION=${SCRIPT_DIR} /P4version.pm,--local-edit,--md5
16
+ else
15
17
# this is git
16
18
GET_VERSION=${SCRIPT_DIR} /gitversion.pm
17
- else
18
- GET_VERSION=${SCRIPT_DIR} /P4version.pm,--local-edit,--md5
19
19
fi
20
20
21
21
Original file line number Diff line number Diff line change @@ -24,14 +24,14 @@ if [ ! -f $LCOV_HOME/scripts/getp4version ] ; then
24
24
MD5_OPT=' ,--md5'
25
25
fi
26
26
# is this git or P4?
27
- if [ 1 == " $USE_GIT " ] ; then
28
- # this is git
29
- VERSION=" --version-script ${SCRIPT_DIR} /gitversion${MD5_OPT} "
30
- ANNOTATE=" --annotate-script ${SCRIPT_DIR} /gitblame.pm,--cache,my_cache"
31
- else
27
+ if [ 1 == " $IS_P4 " ] ; then
32
28
VERSION=" --version-script ${SCRIPT_DIR} /P4version.pm,--local-edit${MD5_OPT} "
33
29
ANNOTATE=" --annotate-script ${SCRIPT_DIR} /p4annotate.pm,--cache,./my_cache"
34
30
DEPOT=" ,."
31
+ else
32
+ # this is git
33
+ VERSION=" --version-script ${SCRIPT_DIR} /gitversion${MD5_OPT} "
34
+ ANNOTATE=" --annotate-script ${SCRIPT_DIR} /gitblame.pm,--cache,my_cache"
35
35
fi
36
36
37
37
if [ $IS_GIT == 0 ] && [ $IS_P4 == 0 ] ; then
You can’t perform that action at this time.
0 commit comments