fix submodule option
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=47
This commit is contained in:
parent
8f193b5de7
commit
66094849a2
@ -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
|
||||
|
||||
|
9
tar_scm
9
tar_scm
@ -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 ..
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user