Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ramontayag
Copy link

Usage:

toreman -f Procfile.test

Copy link
Owner

@pirj pirj left a 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 |
Copy link
Owner

@pirj pirj Jun 3, 2020

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 to Procfile
  • remove the usage of $1 for setting the layout
  • use LAYOUT environment variable for setting the layout, and default to tiled
  • 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?

Copy link
Author

@ramontayag ramontayag Jun 4, 2020

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

Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants