knope icon indicating copy to clipboard operation
knope copied to clipboard

feat: Implement a way to load configuration recursively from parent

Open alex-way opened this issue 1 year ago • 4 comments

Closes #72

This pull request allows knope to recursively search parent directories for a knope.toml file, using the contents of the configuration if found.

An additional option is added and documented for the Command workflow step type;

  • use_working_directory

This option controls whether to run the command in the current working directory that the user is in, or alternatively if set to false the first found configuration file in the ancestry path.

⚠️ Some additional work is still required to assure this is fully working.

Known issues

  • [ ] knope.toml#package.versioned_files attempts to load from the current working directory, rather than the relative path of the configuration file

alex-way avatar Mar 19 '24 20:03 alex-way

Deploy Preview for knope ready!

Name Link
Latest commit fa31f4945b1a0bf91eec29f89205b2cfbe69c354
Latest deploy log https://app.netlify.com/sites/knope/deploys/65f9fc39e54d56000991b92a
Deploy Preview https://deploy-preview-951--knope.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 19 '24 20:03 netlify[bot]

Not currently sure how knope loads the versioned_files but I'll figure it out eventually.

I will also say that I'm still very green when it comes to rust so there's probably plenty that can be optimised both in terms of performance & code style, or is just plain wrong. Hopefully it's not too much of an eyesore, or takes too much time to review.

alex-way avatar Mar 19 '24 21:03 alex-way

Don’t worry too much about versioned_files, it’s being completely refactored in #920. Thanks for taking a stab at this!

dbanty avatar Mar 20 '24 20:03 dbanty

Don’t worry too much about versioned_files, it’s being completely refactored in #920. Thanks for taking a stab at this!

No worries, I'll wait until #920 is complete before doing any further work here.

alex-way avatar Mar 21 '24 12:03 alex-way