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
135135if [ 0 == $? ] ; then
136136 # this is git
137137 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
142138else
143139 p4 have ... > /dev/null 2 >&1
144140 if [ 0 == $? ] ; then
145141 IS_P4=1
146142 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
147151 USE_P4=1
148152 GET_VERSION=${SCRIPT_DIR}/getp4version
149153 GET_VERSION_EXE=${SCRIPT_DIR}/getp4version
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ if [ 0 != $? ] ; then
248248 exit 1
249249 fi
250250fi
251- grep -E " #.* user:.+ $USER " context_comment.info
251+ grep " # user: $USER " context_comment.info
252252if [ 0 != $? ] ; then
253253 echo " Error: did not find context data in comment field"
254254 if [ $KEEP_GOING == 0 ] ; then
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ if [[ 1 == $CLEAN_ONLY ]] ; then
1111fi
1212
1313# 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
1517 # this is git
1618 GET_VERSION=${SCRIPT_DIR} /gitversion.pm
17- else
18- GET_VERSION=${SCRIPT_DIR} /P4version.pm,--local-edit,--md5
1919fi
2020
2121
Original file line number Diff line number Diff line change @@ -24,14 +24,14 @@ if [ ! -f $LCOV_HOME/scripts/getp4version ] ; then
2424 MD5_OPT=' ,--md5'
2525fi
2626# 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
3228 VERSION=" --version-script ${SCRIPT_DIR} /P4version.pm,--local-edit${MD5_OPT} "
3329 ANNOTATE=" --annotate-script ${SCRIPT_DIR} /p4annotate.pm,--cache,./my_cache"
3430 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"
3535fi
3636
3737if [ $IS_GIT == 0 ] && [ $IS_P4 == 0 ] ; then
You can’t perform that action at this time.
0 commit comments