Skip to content

Exlude .gitignore from release tarballs#3562

Open
twouters wants to merge 2 commits into
owasp-modsecurity:v3/masterfrom
twouters:bugfix/3559
Open

Exlude .gitignore from release tarballs#3562
twouters wants to merge 2 commits into
owasp-modsecurity:v3/masterfrom
twouters:bugfix/3559

Conversation

@twouters
Copy link
Copy Markdown

@twouters twouters commented May 11, 2026

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: #3559
Fixes: 04f7009 ("Adds a simple release script")

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")
Comment thread build/release.sh
@twouters
Copy link
Copy Markdown
Author

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

Besides the apparently opinionated nature of the PR, I don't understand what failed here :)

@airween
Copy link
Copy Markdown
Member

airween commented May 11, 2026

Besides the apparently opinionated nature of the PR, I don't understand what failed here :)

You might try:

git commit --allow-empty -m "Trigger SonarCloud"
git push

@sonarqubecloud
Copy link
Copy Markdown

@airween airween requested a review from Copilot May 14, 2026 13:14
@airween airween added the 3.x Related to ModSecurity version 3.x label May 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 .gitignore files from build/release.sh tarball creation.
  • Keep excluding the .git directory from release archives.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread build/release.sh

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
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I noticed this too, but it's not relevant to the proposed change and can be a fixed in separate PR

@airween
Copy link
Copy Markdown
Member

airween commented May 14, 2026

@twouters,

thanks - would you mind to check Copilot's suggestions?

Anyway, let me check the effect of this modification on Salsa's repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Related to ModSecurity version 3.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exclude .gitignore files from release tarballs

3 participants