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

bake: add basename, dirname and sanitize functions #2649

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

tonistiigi
Copy link
Member

These functions help with dealing with path inputs and using parts of them to configure targets.

For example, this improves cases like https://github.com/moby/buildkit/pull/5248/files#diff-870f6fe23fc034f008f5203ee1e628d7bfa65a49095d5a4688db498328449ed2R238 where current best approach is to take hash and lose readability of the variable.

These functions help with dealing with path inputs and
using parts of them to configure targets.

Signed-off-by: Tonis Tiigi <[email protected]>
Copy link
Contributor

@dvdksn dvdksn left a comment

Choose a reason for hiding this comment

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

(follow-up) do we want to create a reference doc for the stdlib functions we ship? Right now we only refer to go-cty which is incorrect https://docs.docker.com/build/bake/funcs/#standard-library

@tonistiigi
Copy link
Member Author

(follow-up) do we want to create a reference doc for the stdlib functions we ship?

This would be nice indeed. Ideally, we could maybe generate that list as we do with the flags.

@crazy-max crazy-max added this to the v0.17.0 milestone Aug 13, 2024
@tonistiigi tonistiigi merged commit 4787b5c into docker:master Aug 13, 2024
106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants