Skip to content

Commit

Permalink
chore: bump version, reuse vars when patching
Browse files Browse the repository at this point in the history
  • Loading branch information
amarao committed Feb 6, 2024
1 parent d3e531a commit c002c63
Show file tree
Hide file tree
Showing 3 changed files with 448 additions and 618 deletions.
6 changes: 3 additions & 3 deletions plugins/strategy/patching.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def loaders_path():

class patch_version(ContextDecorator):
ORIG_LINE = "ANSIBLE_VERSION_MAX = (2, 13)\n"
PATCH_LINE = "ANSIBLE_VERSION_MAX = (2, 15)\n"
PATCH_LINE = "ANSIBLE_VERSION_MAX = (2, 16)\n"

def __enter__(self):
self.patched = False
Expand All @@ -47,8 +47,8 @@ def __enter__(self):
with open(self.lp_orig) as source:
with open(self.lp, "w") as dest:
for line in source.readlines():
if line == "ANSIBLE_VERSION_MAX = (2, 13)\n":
line = "ANSIBLE_VERSION_MAX = (2, 15)\n"
if line == ORIG_LINE:
line = PATCH_LINE
dest.write(line)
return self

Expand Down
Loading

0 comments on commit c002c63

Please sign in to comment.