Skip to content

Commit 36e104c

Browse files
committed
Update gomod_staleness to ensure versions for skipped packages are sticky
Signed-off-by: Davanum Srinivas <[email protected]>
1 parent bc59037 commit 36e104c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

experiment/dependencies/gomod_staleness.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@ def main():
172172
print(">>>> Running command %r" % update_command)
173173
os.system(update_command)
174174

175+
print(">>>> Ensuring Packages that will be skipped are at their previous versions" % args.skip)
176+
for pkg in args.skip:
177+
if pkg in before.keys():
178+
update_command = """\
179+
go get %s@%s""" % (pkg, before[pkg])
180+
print(">>>> Running command %r" % update_command)
181+
os.system(update_command)
182+
175183
print(">>>> parsing go.mod after updates")
176184
after = get_dependencies()
177185
print("Found %d packages after updating dependencies" % len(before.values()))

0 commit comments

Comments
 (0)