Skip to content

Refactoring install plugin script - #427

Merged
undera merged 3 commits into
komodorio:mainfrom
geet-h17:refactoring-install-plugin-script
Jul 6, 2023
Merged

undera merged 3 commits into
komodorio:mainfrom
geet-h17:refactoring-install-plugin-script

Conversation

@geet-h17

@geet-h17 geet-h17 commented Jul 6, 2023

Copy link
Copy Markdown
Contributor

Changes Proposed

Refactored the installation script to improve functionality, efficiency, and maintainability.

Additional Information

I have made the following changes to the script:

  • Replaced inconsistent variable usage with consistent usage of the name variable.
  • Introduced functions to encapsulate repetitive code blocks.
  • Handled errors gracefully and provided informative error messages.
  • Validated the availability of required dependencies.
  • Used consistent indentation and formatting throughout the script.
  • Separated concerns into separate functions for version detection, downloading, and installation.

Screenshots

Check List

  • [ x] The title of my pull request is a short description of the changes
  • This PR relates to some issue:
  • [ x] I have documented the changes made (if applicable)
  • [ x] I have covered the changes with unit tests

@github-actions github-actions Bot added the ci label Jul 6, 2023
Comment thread scripts/install_plugin.sh Outdated
echo "Downloading and installing ${name} v${version} ..."

url=""
echo "Downloading andinstalling ${name} v${version} ..."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misprint: space

Comment thread scripts/install_plugin.sh
command -v "$1" >/dev/null 2>&1 || error_exit "Required command '$1' not found. Please install it."
}

[ ! -z "$HELM_DEBUG" ] && set -x

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to HELM_DEBUG logic? The intent there is to look at that env variable and add bash command verbosity.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry it was just an unintentional deletion as I typed wrong number of lines to be dd-ed on vim... I have update the code now.

@undera undera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix misprint please, and address my comment

@undera

undera commented Jul 6, 2023

Copy link
Copy Markdown
Collaborator

Thanks for the contribution!

@undera
undera merged commit 5531286 into komodorio:main Jul 6, 2023
@geet-h17
geet-h17 deleted the refactoring-install-plugin-script branch July 6, 2023 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址