Exlude .gitignore from release tarballs#3562
Conversation
The `.gitignore` files should not be included in the release tarballs because they hide required files and can conflict with existing `.gitignore` files when the tarball is extracted into a git repository. Closes: owasp-modsecurity#3559 Fixes: 04f7009 ("Adds a simple release script")
Besides the apparently opinionated nature of the PR, I don't understand what failed here :) |
You might try: |
|
There was a problem hiding this comment.
Pull request overview
Updates the release tarball generation script to avoid shipping .gitignore files, preventing extracted releases from unintentionally hiding required files or conflicting with existing ignore rules in downstream git repos (per issue #3559).
Changes:
- Exclude
.gitignorefiles frombuild/release.shtarball creation. - Keep excluding the
.gitdirectory from release archives.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| cd .. | ||
| tar --transform "s/^$MY_DIR/$DIR_NAME/" -cvzf $TAR_NAME --exclude .git $MY_DIR | ||
| tar --transform "s/^$MY_DIR/$DIR_NAME/" -cvzf $TAR_NAME --exclude .git --exclude .gitignore $MY_DIR |
There was a problem hiding this comment.
I noticed this too, but it's not relevant to the proposed change and can be a fixed in separate PR
|
thanks - would you mind to check Copilot's suggestions? Anyway, let me check the effect of this modification on Salsa's repository. |



The
.gitignorefiles should not be included in the release tarballs because they hide required files and can conflict with existing.gitignorefiles when the tarball is extracted into a git repository.Closes: #3559
Fixes: 04f7009 ("Adds a simple release script")