[go: up one dir, main page]

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 --help usage to install.sh and exit when invalid arg / Update contributing docs #421

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

hdub-tech
Copy link

Upfront apologies

I apologize for not opening an issue first. Excuse:

When I first stumbled on the issue that led me to submit this PR, I read this repo's README and PR template, and also looked for a CONTRIBUTING file to make sure it wasn't a requirement to open an issue first. Not finding any obvious prerequisites, I proceeded to do the work and testing. It wasn't until after I finished, when I already had all my notes ready to go, and clicked the PR button that I realized I forgot to look at the PR template raw comments... which is where the Contributing guidance was hiding. So I'm hoping you will let me get away with skipping opening issues this one time and accept my PR with the cute picture sacrifice and additional payment of "fixing" the Contributing guidance so that hopefully other first time contributors don't have the same issue.

- What I did

  1. Fixed an issue where install.sh will not exit with error when supplied invalid arguments.
  2. Added support to install.sh for --help argument.
  3. Removed the dead link in the PR template Contributing guidance.
  4. Added the PR template Contributing guidance to a Contributing section on the main README.

- How I did it

  1. usage function called when invalid argument is provided to install.sh and script exits WITH error.
  2. New (commented) usage function with new supported --help argument in install.sh which will exit WITHOUT error.
  3. Deleted the sentence with the dead link in the PULL_REQUEST_TEMPLATE.md.
  4. Copy/Paste/Edit the main contributing guidance from the PULL_REQUEST_TEMPLATE.md to the repo README.md.

- How to verify it

1. Exit install.sh with usage and error on invalid argument

sh install.sh --invalid

  • BEFORE:

    illegal-opt-still-installs

  • AFTER:

    illegal-opt-usage-exit-error


2. Exit install.sh with usage and NO error on --help argument

sh install.sh --help

  • BEFORE (same as above):

    illegal-opt-still-installs

  • AFTER:

    help-opt-gives-usage


Regression tests: install still works

  • sh install.sh --dry-run

    install-dry-run

  • sh install.sh

    install-run


Linted and tested locally

  • shellcheck:

    make-shellcheck

  • test:

    make-test


README Contributing section

readme-contributing


- Description for the changelog

(I know this says one line for the whole PR but traditionally changelogs have one line per THING and my PR has 2 distinct things)

  • Fixes an issue where install.sh will not exit with error when supplied invalid arguments
  • Enhances install.sh with --help argument to output usage statement

- A picture of a cute animal (not mandatory but encouraged)

GoodBoi

Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
Main link is widely inclusive of information already.

Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
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.

1 participant