Init
This commit is contained in:
commit
4916c1972f
|
@ -0,0 +1,13 @@
|
||||||
|
from tyop import Migration
|
||||||
|
|
||||||
|
|
||||||
|
class InternalTrueMigration(Migration):
|
||||||
|
"""Add `internal: true` to all internal network definitions."""
|
||||||
|
|
||||||
|
GLOB = "~/.abra/apps/**/**.yml"
|
||||||
|
|
||||||
|
def migrate(compose):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
InternalTrueMigration()
|
|
@ -0,0 +1,24 @@
|
||||||
|
"""Automated your mass typo updates."""
|
||||||
|
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
|
class Migration:
|
||||||
|
def __init__(self):
|
||||||
|
self.validate()
|
||||||
|
self.run()
|
||||||
|
|
||||||
|
def validate(self):
|
||||||
|
if not hasattr(self, "GLOB"):
|
||||||
|
print("Define `GLOB` on your migration!")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
pass
|
||||||
|
# TODO:
|
||||||
|
# For each path in the GLOB
|
||||||
|
# Load it and pass it into the migrate function
|
||||||
|
# Once it comes back, save the contents back to the FS
|
||||||
|
# Run a diff without pager and ask whether that looks ok
|
||||||
|
# After like 3 tries, ask if "this looks ok" + skip the rest
|
||||||
|
# Run through each repo and ask to commit + push
|
Reference in New Issue