mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
added support for rev branch when using deepth parameter
This commit is contained in:
parent
502a7538eb
commit
ae6ae3ea94
@ -105,8 +105,8 @@ def latest(name,
|
||||
|
||||
depth
|
||||
Defines depth in history when git a clone is needed in order to ensure
|
||||
latest. E.g. ``depth: 0`` is usefull when deploying from a repository
|
||||
with a long history. (Default: ``None``)
|
||||
latest. E.g. ``depth: 1`` is usefull when deploying from a repository
|
||||
with a long history. Use rev to specify branch. This is not compatible with tags or revision IDs.(Default: ``None``)
|
||||
|
||||
identity
|
||||
A path on the minion server to a private key to use over SSH
|
||||
@ -369,6 +369,8 @@ def latest(name,
|
||||
# if depth is given add --depth <depth> to opts
|
||||
if depth is not None:
|
||||
opts += ' --depth {0}'.format(depth)
|
||||
if rev is not None:
|
||||
opts += ' --branch {0}'.format(rev)
|
||||
|
||||
# do the clone
|
||||
__salt__['git.clone'](target,
|
||||
|
Loading…
Reference in New Issue
Block a user