Adrian Schröter 2012-07-03 11:24:32 +00:00 committed by Git OBS Bridge
parent 8f193b5de7
commit 66094849a2
3 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jul 3 11:23:12 UTC 2012 - adrian@suse.de
- fix option for submodule update
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Jun 30 13:56:51 UTC 2012 - magist3r@gmail.com Sat Jun 30 13:56:51 UTC 2012 - magist3r@gmail.com

View File

@ -21,7 +21,7 @@ set_default_params () {
MYFILENAME="" MYFILENAME=""
MYREVISION="" MYREVISION=""
MYPACKAGEMETA="" MYPACKAGEMETA=""
USE_GIT_SUBMODULE=true USE_SUBMODULES=enable
# MYHISTORYDEPTH="" # MYHISTORYDEPTH=""
INCLUDES="" INCLUDES=""
} }
@ -92,8 +92,9 @@ parse_params () {
echo "history-depth parameter is obsolete and will be ignored" echo "history-depth parameter is obsolete and will be ignored"
shift shift
;; ;;
*-disable-git-submodule) *-submodules)
USE_GIT_SUBMODULE=false USE_SUBMODULES="$2"
shift
;; ;;
*) *)
echo "Unknown parameter: $1" echo "Unknown parameter: $1"
@ -245,7 +246,7 @@ initial_clone () {
git) git)
# Clone with full depth; so that the revision can be found if specified # Clone with full depth; so that the revision can be found if specified
safe_run git clone "$MYURL" "$CLONE_TO" safe_run git clone "$MYURL" "$CLONE_TO"
if $USE_GIT_SUBMODULE; then if [ "$USE_SUBMODULES" == "enable" ]; then
safe_run cd "$CLONE_TO" safe_run cd "$CLONE_TO"
safe_run git submodule update --init --recursive safe_run git submodule update --init --recursive
safe_run cd .. safe_run cd ..

View File

@ -44,5 +44,10 @@
<parameter name="history-depth"> <parameter name="history-depth">
<description>Stored history depth. Special value "full" clones/pulls full history. Only valid if SCM git is used.</description> <description>Stored history depth. Special value "full" clones/pulls full history. Only valid if SCM git is used.</description>
</parameter> </parameter>
<parameter name="submodules">
<description>Do not include git submodules.</description>
<allowedvalue>enable</allowedvalue>
<allowedvalue>disable</allowedvalue>
</parameter>
</service> </service>