Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

hassbian-config: New run-suite function #138

Merged
merged 5 commits into from
Mar 13, 2018
Merged

hassbian-config: New run-suite function #138

merged 5 commits into from
Mar 13, 2018

Conversation

ludeeus
Copy link
Member

@ludeeus ludeeus commented Mar 11, 2018

Description:

This PR has various changes:

  • New functionality for existing functions.
  • New function.
  • Changed lowercase cmd options to uppercase
  • Moved some default stuff out of script files.

New functionality for existing functions.

install-suite and upgrade-suite now work as checking functions.
If they think they can continue with the install/upgrade of if --force is supplied.
It will pass the instructions to the new run-suite function.

New function.

run-suite will handle:

  • Installations.
  • Upgrades.
  • Writing control file based on return value.
  • activating/deactivating debug.

Changed lowercase cmd options to uppercase

-f and -y are "changed" to -F and -Y, lowercase are kept for compability.

Moved some default stuff out of script files.

Every script file had suite-show-short-info and suite-show-copyright-info at the top of every install/upgrade function, this was unnecessary and has now been moved to the "tool" (hassbian-config).
The same with this line:
If you have issues with this script, please say something in the #devs_hassbian channel on Discord.
This will now only get printed if the script install/upgrade function returns with other than 0
This way we have somewhat cleaner files, and a single place to update if we need to.

Checklist:

  • The code change is tested and works locally.
  • Created/Updated documentation at /docs
    • Updated Contributing to match this PR.
    • Updated hassbian-config docs to match this PR.

@ludeeus ludeeus added this to the v0.8.0 milestone Mar 11, 2018
@ludeeus ludeeus requested a review from Landrash March 11, 2018 16:44
Copy link
Collaborator

@Landrash Landrash left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Some minor rewording of on comment can be rewritten but with that exception this can be merged.

return 0
}

function install-suite { #This function do checks if we want/can to install.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wording in explanation is a bit of.
Change to
#This function do checks if we can/want to install.

Copy link
Member Author

Choose a reason for hiding this comment

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

I read this 5 times before seeing the change...

@Landrash Landrash merged commit a2684e1 into home-assistant:dev Mar 13, 2018
@ludeeus ludeeus deleted the run-function branch March 13, 2018 19:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants