Skip to content

Commit 54e53e3

Browse files
authored
Merge pull request #34850 from dims/update-gomod_staleness-to-ensure-versions-for-skipped-packages-are-sticky
Update gomod_staleness to ensure versions for skipped packages are sticky
2 parents bc59037 + 36e104c commit 54e53e3

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)