weaveworks / wks-quickstart-firekube

Example configuration to create Kubernetes clusters powered by ignite and gitops
342 stars 372 forks source link

refactor: Extract bash functions into imported modules #59

Closed mflendrich closed 5 years ago

mflendrich commented 5 years ago

This PR creates 2 new files: /lib/functions.sh and /lib/binaries.sh to be sourced from the main script. This serves two purposes:

  1. (main motivation) makes it possible to reuse these functions in other quickstart repos (by git subtree or a different yet undefined mechanism)
  2. (nice side effect) separates the quickstart logic from primitive operation implementations for added visibility and maintainability

The implementations are unchanged.

Tested manually - the quickstart continues to work.

mflendrich commented 5 years ago

:scream_cat: it will probably be easier to drop this PR and recreate after the other ones are merged.

@stealthybox is there an ETA of the aforementioned merges being completed?

mflendrich commented 5 years ago

@dlespiau Apparently all the conflicting PRs have been merged. I've recreated this change. This time I split binaries.sh into separate per-binary files that are now very similar to each other.

PTAnotherL.