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(tasks): infer bash task topics from folder structure #1520

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

Ajpantuso
Copy link
Contributor

Summary

Closes #1269

These changes make it possible to define bash tasks in a nested folder structure under the predefined task directories. Tasks defined in directories below the parent tasks directory will have implied scope in their names by joining their relative path with :s.

For example a task defined at {{config_root}}/.mise/tasks/a/b/task will have task name a:b:task.

Additional Notes

  • While walkdir was already a transitive dependency it is now a direct dependency to provide recursive walks through the filesystem.
  • If a bash script task contains the : character it will be replaced by _ to prevent name collisions.
  • Simple enough to test locally so I did, but some integration/e2e tests wouldn't hurt here.

@jdx
Copy link
Owner

jdx commented Jan 25, 2024

incredible! Your rust is excellent btw, have you been writing it long?

@Ajpantuso
Copy link
Contributor Author

incredible! Your rust is excellent btw, have you been writing it long?

Thanks, only about a year now, but I spent a good amount of time with Haskell in college so iterators/function composition/Algebraic Data Types are a little more natural for me now.

@jdx jdx merged commit 2d63b59 into jdx:main Jan 25, 2024
7 checks passed
@Ajpantuso Ajpantuso deleted the apantuso/bash_task_topics branch January 25, 2024 01:30
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.

task topics
2 participants