mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Check remote tags before deciding to do a fetch #42329
This commit is contained in:
parent
bc1effc4f2
commit
389c037285
1 changed files with 13 additions and 0 deletions
|
@ -1308,6 +1308,19 @@ def latest(name,
|
|||
'if it does not already exist).',
|
||||
comments
|
||||
)
|
||||
if set(all_local_tags) != set([
|
||||
x.split('/')[-1] for x in __salt__['git.ls_remote'](
|
||||
cwd=target,
|
||||
remote=remote,
|
||||
opts="--tags",
|
||||
user=user,
|
||||
password=password,
|
||||
identity=identity,
|
||||
saltenv=__env__,
|
||||
ignore_retcode=True,
|
||||
).keys()
|
||||
]):
|
||||
has_remote_rev = False
|
||||
|
||||
if not has_remote_rev:
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue