X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/a95c3034e599a96b0b1609991a712409b5c3b7cf..6554c6378a6e801b4fe47c50688cdae1d627bc18:/wizard/command/prepare_config.py diff --git a/wizard/command/prepare_config.py b/wizard/command/prepare_config.py index 5008b85..13a4bc9 100644 --- a/wizard/command/prepare_config.py +++ b/wizard/command/prepare_config.py @@ -1,11 +1,18 @@ import sys +import os.path from wizard import command, deploy, shell def main(argv, baton): options, args = parse_args(argv, baton) - sh = shell.Shell() wc = deploy.WorkingCopy(".") + wc.verify() + wc.verifyConfigured() + # worst case scenario protection + for file in wc.application.parametrized_files: + shell.call("git", "add", file) + shell.call("git", "commit", "--allow-empty", "-am", "Protection commit") + shell.call("git", "reset", "HEAD~") wc.prepareConfig() def parse_args(argv, baton):