-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emanate should provide a way to run some scripts on use #54
Comments
So, rough idea for this:
Some notes:
Would that work for you, @kayila? |
Actually, instead of With def main(clean_or_create):
if clean_or_create == "create":
create()
else:
clean()
def create():
pass
def clean():
pass Whereas with the latter, you lose the def create():
pass
def clean():
pass |
Not sure I'm super keen on having code-execution capabilities bolted into emanate. If you are doing it, this seems like a reasonable plan, though I would put some caveats:
(@duckinator asked for my opinion) |
Thinking about it more, I'm leaning towards something far more straightforward -- the ability to execute commands at 4 points of Emanate's normal execution, specified like so: {
"ignore": ["README.md", "emanate.pyz"],
"before-create": "./emanate-scripts/before-create.sh",
"after-create": "./emanate-scripts/after-create.sh",
"before-clean": "./emanate-scripts/before-clean.sh",
"after-clean": "./emanate-scripts/after-clean.sh"
} They'd each stop the entire process if they exited with a non-zero status code. And possibly (if there's interest), we could also create a basic script management tool similar to what I described above, and you could just have various invocations of that as the specified commands to run. |
@nbraud what're your thoughts on that approach^? |
That seems OKish. Maybe add a way to turn script support off, that can't be overriden from within the source directory (for instance with an |
Could perhaps have a
|
Makes sense; might get awkward with the current config infrastructure, if the priority order for that option is different from everything else (ordering the global config before the local one), but I don't see a clean way out of this. Maybe erroring-out if the |
Emanate is a great script for 'moving in' to a system, but some of my files require other things to be done (for instance things cloned, etc.) Emanate should provide a way to have a set of 'setup scripts' to run in order to set things up.
The text was updated successfully, but these errors were encountered: