mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 10:07:21 +02:00
Add: get git submodules in one step
--recursive --recurse-submodules After the clone is created, initialize all submodules within, using their default settings. This is equivalent to running git submodule update --init --recursive immediately after the clone is finished. This option is ignored if the cloned repository does not have a worktree/checkout (i.e. if any of --no-checkout/-n, --bare, or --mirror is given) from http://git-scm.com/docs/git-clone
This commit is contained in:
parent
8102265475
commit
f90c099e68
@ -94,10 +94,10 @@ func (r *Repo) Commands() []string {
|
||||
branch := r.Branch
|
||||
if len(branch) == 0 {
|
||||
branch = "master"
|
||||
}
|
||||
}r
|
||||
|
||||
cmds := []string{}
|
||||
cmds = append(cmds, fmt.Sprintf("git clone --branch=%s %s %s", branch, r.Path, r.Dir))
|
||||
cmds = append(cmds, fmt.Sprintf("git clone --recursive --branch=%s %s %s", branch, r.Path, r.Dir))
|
||||
|
||||
switch {
|
||||
// if a specific commit is provided then we'll
|
||||
|
Loading…
Reference in New Issue
Block a user