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

File Pattern Negation #452

Open
Supermarcel10 opened this issue May 7, 2024 · 1 comment
Open

File Pattern Negation #452

Supermarcel10 opened this issue May 7, 2024 · 1 comment

Comments

@Supermarcel10
Copy link

I haven't been able to find any documentation if there exists a way to negate elements in the files section of the workflow.

The idea being is that you can bulk select an entire selection of files for the workflow, but deselect specific selections (similar to how .gitignore works). Or alternatively a way to use regex where I can say that I want all jar files without a specific string.

Usage:

files: |
            build/libs/*.jar
            !build/libs/*-unshaded.jar

Thrown warning:
🤔 Pattern '!build/libs/*-unshaded.jar' does not match any files.

What I want to achieve with this, is add all built jar files from my modules, without their -unshaded versions.

@caquino
Copy link

caquino commented Jun 17, 2024

The way that the patterns work is a little bit different, for example to skip unshaded you would use

files: |
        build/libs/*!(*unshaded*).jar

I didn't test this, so you may need to play around with the *. Also, you don't need two patterns; just one will attach all jars that don't have unshaded.

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

No branches or pull requests

2 participants