Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
justfile: Sanitize branch names before using them in container tags
Using the branch name as part of containers tags fails when branch names contain characters that are not valid for container tags (or not valid at the location where we use the branch name in the tag string). To prevent the CI workflow from failing when the Pull Request branch name contains a slash, for example, sanitize the branch name before using it. We sanitize it by translating ('tr') everything that is not ('-c') an alphanumeric character ('[:alnum:]') or a line break ('\n') into dashes. We keep line breaks because we don't want the final line break appended by echo to be converted into a dash; assigning the string to '_branch' will trim the ending line break anyway. Fixes: b88ec42 ("Build system") Signed-off-by: Quentin Monnet <[email protected]>
- Loading branch information