Skip to content

Exclude repository-configuration from git-archive#1343

Merged
zariiii9003 merged 1 commit into
hardbyte:developfrom
umlaeute-contributions:bugfix/drop-repo-config
Jul 11, 2022
Merged

Exclude repository-configuration from git-archive#1343
zariiii9003 merged 1 commit into
hardbyte:developfrom
umlaeute-contributions:bugfix/drop-repo-config

Conversation

@umlaeute
Copy link
Copy Markdown
Contributor

@umlaeute umlaeute commented Jul 7, 2022

tracking repository configuration (like .gitignore) and CI-configuration (.github/, .travis.yml) within a repository is nice, practical and sometimes unavoidable.

however, such configs do not place nicely when downstreams import the archives into their own git-based workflows.

e.g. for the Debian packaging of python-can, we definitely do not want to hide any build-artifacts via .gitignore (our workflow is very different from that of upstream development).
we also do not want to accidentally trigger our CI (our CI is supposed to test the packaging, rather than the development).
otoh, we also want to follow the upstream sources as close as possible (that is: without adding/changing/removing any files from the upstream releases).

the typical fix for this is to simply not include the repository-configuration when exporting a snapshot, such as is created automatically by github when downloading a "Release Tarball" (which is really just running git archive in the background).

the .gitattributes file in this PR does exactly this: it excludes a number of repository- and CI-configuration files from git archive.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 7, 2022

Codecov Report

Merging #1343 (e27993b) into develop (5bca2d7) will increase coverage by 0.04%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #1343      +/-   ##
===========================================
+ Coverage    66.01%   66.06%   +0.04%     
===========================================
  Files           86       86              
  Lines         8960     8960              
===========================================
+ Hits          5915     5919       +4     
+ Misses        3045     3041       -4     

@zariiii9003
Copy link
Copy Markdown
Collaborator

I'm not sure i understand your use case. Debian packaging clones the python-can github repo? Why wouldn't they use the source distribution on PyPI?

@umlaeute
Copy link
Copy Markdown
Contributor Author

We use the source tarballs from github (not a clone of GH repository).

iirc, the reason being that the we want to run all the checks (as found in the upstream development, but often stripped from pypi packages) but avoid binary artifacts (often found in pypi packages).

this is a generic answer (I'm currently afk and cannot check the specific reason for python-can)

otoh: do you have a specific usecase why you want to include .gitignore and .github/ in the release tarballs?

@zariiii9003 zariiii9003 merged commit f59fe4f into hardbyte:develop Jul 11, 2022
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.

2 participants