Skip to content

Commit

Permalink
Add a script to patch a Gemfile.lock for a plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Oct 11, 2023
1 parent 9c56b7b commit 21f8197
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bin/ci/patch_plugin_gemfile_lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python3

import os
import re

with open('Gemfile.lock') as f:
gemfile_lock = f.read()

gemfile_lock_patched = re.compile("GIT\n remote: %s/%s\n revision: .+\n branch: .+\n" %(os.environ['GITHUB_SERVER_URL'], os.environ['GITHUB_REPOSITORY'])).sub('PATH\n remote: .\n', gemfile_lock)

with open('Gemfile.lock', 'w') as f:
f.write(gemfile_lock_patched)

0 comments on commit 21f8197

Please sign in to comment.