-
-
Notifications
You must be signed in to change notification settings - Fork 2k
first stab at a common functions library. include argument parsing and a few definitions wired up. closes #932. closes #945 #949
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The help message header changed. This allows for additional dokku args without changing the test.
|
Might make sense to have a shortcut for |
|
Shortcut? We expose |
|
No I mean like an |
|
Ah! Yeah I was going to do something like that. Forgot between yesterday and today. 😄 I'll take a stab at it. |
|
Please use just "name() {}" instead of "function name() {}". The use of |
|
I'd also suggest to prepend the logging functions (infoN, verbose, warn, etc) with a prefix (dokku_log_$funcname? whatever) to expose them as a sort of consistent public interface to external plugins. A namespace-style prefix would also avoid namespace clashes with functions that could be possibly defined by 3rd-party plugins. Good job though, thanks! |
|
This project is a bash project, and all the files reference the bash interpreter at the top, so I don't see any "bashisms" as bad :) Good call on the function prefixing though. |
|
From http://tldp.org/LDP/abs/html/functions.html:
As mentioned, this is distinctly a bash project with no desire to be portable to other shells. That being said if there is additional push back, I don't have a strong position on modifying the |
|
@alessio i just came across this. https://github.com/progrium/bashstyle I suppose that's additional push back 😉 I'll refactor it. |
To be clear, this is a first pass. Please have a look and beat it up.
Includes options to enable tracing, auto rm containers on
run, and "quiet" output. The command line args just set env variables and thus can be used for multiple plugins/commands simultaneously.This also sets DOKKU_QUIET_OUTPUT if we do not have a tty.