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

fully recursive exclusions? #24

Closed
m4ttheweric opened this issue Apr 5, 2022 · 3 comments
Closed

fully recursive exclusions? #24

m4ttheweric opened this issue Apr 5, 2022 · 3 comments

Comments

@m4ttheweric
Copy link

m4ttheweric commented Apr 5, 2022

Hi, am I struggling figuring out the syntax that will allow me to exclude all files of a given type recursively.

For example, let's say I want to exclude all files ending with .txt

exclusions: *.txt <- only excludes files at the root dir
exclusions: */*.txt <- only excludes files at the 2nd level

I have tried some other combos, but I think the actual thing here is to pass the r modifier to the exclusion flag in 7zip.

Glancing at your source code, it looks like you pass -x!

According to the 7zip docs it looks like if that was changed to -xr! it would allow for recursive searching.

@m4ttheweric m4ttheweric changed the title exclude files at all depths fully recursive exclusions? Apr 5, 2022
@TheDoctor0
Copy link
Owner

Hello @m4ttheweric!
I have to say that the flag was removed in the latest merged PR because it can result in some unexpected issues.
That said I think that I can add a way to force using it, for example by creating a recursive_exclusions option.

I will try to get back to it today but if you want you can also fork the repository, make changes and open a pull request - I will be happy to accept and merge it!

@m4ttheweric
Copy link
Author

thank you so much for doing this so quickly!

I was resorting to writing a batch file to delete files from the workflow run before zipping, but I was running into permissions issues, so this makes it easier.

@m4ttheweric
Copy link
Author

So, in my initial testing, none of the recursive exclusions are working. The relevant bits of my workflow are below (note I am using multi-line YAML which has not been an issue so far):

         - name: Zip MBMD.UI Artifacts
           uses: thedoctor0/zip-release@master
           with:
              filename: ui.zip
              directory: 'MBMD.UI/'
              exclusions: |
                 YuiCompressorMsBuild
                 packages
                 *.csproj
                 *.sln
                 mbmd.png
              recursive_exlusions: |
                 *.config
                 *.as*x.cs
                 *.designer.cs
                 *.Master.cs

Do I need to do something different here? The exclusions are all working, but the recursive_exlusions are not working across the board.

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