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

controllers: control tar ignores w/ exclude files #55

Merged
merged 1 commit into from
May 13, 2020
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented May 13, 2020

This commit changes the file excludes for tarballs generated for
Git repository artifacts from a fixed set of strings to include
exclusion files files. It currently takes .sourceignore and
in the root of the given directory into account.

In addition to this the Git VCS related files that are ignored have
been extended to not only include the .git/ directory, but also the
.gitignore, .gitmodules and .gitattributes files. Mimicking part of
the --exclude-vcs flag not available on all tar versions.

Fixes #35

controllers/storage.go Show resolved Hide resolved
controllers/storage.go Outdated Show resolved Hide resolved
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

Looks good, can you please add the ignore feature to the GitRepository spec or do a followup PR?

@hiddeco
Copy link
Member Author

hiddeco commented May 13, 2020

Wanted to make the spec change (or rather rule definition) in a separate PR as this seems to have become the standard.

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

💯

This commit changes the file excludes for tarballs generated for
Git repository artifacts from a fixed set of strings to include
exclusion files files. It currently takes `.sourceignore` and
in the root of the given directory into account.

In addition to this the Git VCS related files that are ignored have
been extended to not only include the .git/ directory, but also the
.gitignore, .gitmodules and .gitattributes files. Mimicking part of
the --exclude-vcs flag not available on all tar versions.
@hiddeco hiddeco merged commit 96a76c2 into master May 13, 2020
@hiddeco hiddeco deleted the tar-ignore branch May 13, 2020 18:06
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

Successfully merging this pull request may close these issues.

git: support .tarignore
2 participants