-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allow setting of Procfile via -f or --procfile #1
base: master
Are you sure you want to change the base?
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.
Thanks for making this first move to make toreman closer to foreman feature-wise!
|
||
PROCFILE=${PROCFILE:-Procfile} | ||
|
||
grep --invert-match '^#' < $PROCFILE | |
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.
I must admit I've made a huge design mistake by giving in and letting to accept the layout as the first command-line argument (select-layout ${1:-tiled}
). Foreman accepts a process name as the first argument, and by using it otherwise we're breaking this already subtle compatibility altogether.
Accepting command-line options prevents any further extensibility attempts without breaking the one-liner approach.
What do you think of using environment variables instead of passing options?
To meet the design goal of keeping this script one-line'ish, to keep the ability to set the layout, and to be able to choose the procfile to be used would you agree to do the following:
- use the
PROCFILE
environment variable, and default toProcfile
- remove the usage of
$1
for setting the layout - use
LAYOUT
environment variable for setting the layout, and default totiled
- update the README to reflect those changes
- introduce a CHANGELOG.adoc to tell about those changes and mentioning yourself there
I haven't thought of versioning before, and as since this is a breaking change, we would have to change the major version or keep pretending that we were at 0.9 before, and 1.0 now.
Would you like to make such changes?
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.
Oh that's fine too! Never bothered to change the tiling. Will the command look like this?
PROCFILE=Procfile.dev.remote toreman
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.
Never bothered to change the tiling.
Me neither 😆
Will the command look like this?
PROCFILE=Procfile.dev.remote toreman
Exactly, that was the idea. Does it fit your needs?
Usage:
toreman -f Procfile.test