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

View File

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

View File

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