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

Add support for "--help" in scripts #916

Open
AlexSkrypnyk opened this issue May 5, 2023 · 0 comments
Open

Add support for "--help" in scripts #916

AlexSkrypnyk opened this issue May 5, 2023 · 0 comments
Labels
Type: Idea Idea that requires additional discussion
Milestone

Comments

@AlexSkrypnyk
Copy link
Member

AlexSkrypnyk commented May 5, 2023

Use this example:

#/ Usage:       ./bake.sh [path/to/manifest.hcl] [path/to/another/manifest.hcl]
#/ Description: Wrapper script for running docker buildx bake with separate manifest files.
#/ Options:
#/   --help: Display this help message
usage() { grep '^#/' "$0" | cut -c4- ; exit 0 ; }
expr "$*" : ".*--help" > /dev/null && usage

Since the scripts are driven by env variables rather than arguments, the usage() from the above may need to be more complex as we would want to see something like:

...
Environment variables:
DREVOPS_SCAFFOLD_EXAMPLE_URL: Example scaffold variable with a default value.
DREVOPS_SCAFFOLD_EXAMPLE_URL_OTHER: Example scaffold variable other with a default value.
...
@github-project-automation github-project-automation bot moved this to BACKLOG in Vortex May 5, 2023
@AlexSkrypnyk AlexSkrypnyk added this to the 1.17 milestone May 9, 2023
@AlexSkrypnyk AlexSkrypnyk added the Type: Feature Issue is a new feature request label May 16, 2023
@AlexSkrypnyk AlexSkrypnyk modified the milestones: 1.17, 1.18 Jul 30, 2023
@AlexSkrypnyk AlexSkrypnyk moved this from BACKLOG to Next release in Vortex Sep 6, 2023
@AlexSkrypnyk AlexSkrypnyk moved this from Next release to To do for current release in Vortex Oct 3, 2023
@AlexSkrypnyk AlexSkrypnyk moved this from To do for current release to Next release in Vortex Oct 4, 2023
@AlexSkrypnyk AlexSkrypnyk modified the milestones: 1.18, 1.19 Oct 4, 2023
@AlexSkrypnyk AlexSkrypnyk modified the milestones: 1.19, 1.20 Nov 22, 2023
@AlexSkrypnyk AlexSkrypnyk modified the milestones: 1.20, 1.21 Feb 15, 2024
@AlexSkrypnyk AlexSkrypnyk moved this from Next release to BACKLOG in Vortex Apr 8, 2024
@AlexSkrypnyk AlexSkrypnyk added Type: Idea Idea that requires additional discussion and removed Type: Feature Issue is a new feature request labels Apr 8, 2024
@AlexSkrypnyk AlexSkrypnyk moved this from BACKLOG to Next release in Vortex Apr 16, 2024
@AlexSkrypnyk AlexSkrypnyk modified the milestones: 2.1, 1.24 Aug 16, 2024
@AlexSkrypnyk AlexSkrypnyk modified the milestones: 1.24, 2.1, 24.12.0, 25.1.0 Aug 28, 2024
@AlexSkrypnyk AlexSkrypnyk modified the milestones: 25.1.0, 25.2.0 Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Idea Idea that requires additional discussion
Projects
Status: BACKLOG
Development

No branches or pull requests

1 participant