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

feat: Implement a way to load configuration recursively from parent #951

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alex-way
Copy link
Contributor

@alex-way alex-way commented Mar 19, 2024

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 alex-way marked this pull request as draft March 19, 2024 20:57
Copy link

netlify bot commented Mar 19, 2024

Deploy Preview for knope ready!

Name Link
🔨 Latest commit fa31f49
🔍 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.

@alex-way
Copy link
Contributor Author

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.

@dbanty
Copy link
Member

dbanty commented Mar 20, 2024

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

@alex-way
Copy link
Contributor Author

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.

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.

Detect knope.toml in parent directories
2 participants