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

Proposal: Allow disabling extended start script commands #927

Open
codeadict opened this issue Jan 23, 2023 · 1 comment
Open

Proposal: Allow disabling extended start script commands #927

codeadict opened this issue Jan 23, 2023 · 1 comment

Comments

@codeadict
Copy link

codeadict commented Jan 23, 2023

We are using a custom extended start script but would love to have the one generated by relx as it will be easier to keep up to date and any contribution can benefit our project or i can contribute back any improvement to Relx. One of the limitations i've found is that is easier to extend the script with hooks/extensions but not so easy to remove commands from the existing script. For example we don't need hot code loading / upgrading releases so the following commands are extra boilerplate our users don't need:

  upgrade [Version]       Upgrade the running release to a new version
  downgrade [Version]     Downgrade the running release to a new version
  install [Version]       Install a release
  uninstall [Version]     Uninstall a release
  unpack [Version]        Unpack a release tarball
  versions                Print versions of the release available

I was wondering if this is a need someone else have faced and if relx would accept having an optional configurations like {extended_start_commands, [foreground, stop, ping]} which will default to all if not provided and that way commands could be removed from the script.

@ferd
Copy link
Collaborator

ferd commented Jan 25, 2023

This could probably be added by having each of the value in the commands define a template variable like command_foreground and command_stop that the templating function could then pass to bbmustache to use with the {{#varname}}...{{/varname}} sections to show or drop a command.

An option would be to just drop the silenced commands from the help, or drop the command entirely. I'm imagining there could be fewer risks of scripts that complain with linters for unused functions or whatever if we only silenced help rather than removed entire commands.

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

No branches or pull requests

2 participants