Search code examples
c++gitgithubreleaserelease-management

What is the proper way to create a Release version of my C++ library on GitHub?


I am maintaining a scientific library as a C++ repository on GitHub, using Cmake for builds.

Now the problem is the following:

There is a lot of code in the repository that the end users do not want to download. This includes e.g. support code to produce precomputed coefficients and calculation parameters. The end users only want to download the minimal amount of files that are necessary for them to do their job. The motivation for this is to minimize the size of the library and to make it easier for the end users to understand the code they want to use.

My question is: Is it possible to create a "Release Version" of a library in a GitHub repository, and if yes, how should this be done properly?


Solution

  • If you add .gitattributes to your repository, you can add files/wildcards in similar fashion as in .gitignore but then you can add export-ignore after the file entry. Files that then match these ignored patterns wont be added to the release source archive.