epasveer / seer

Seer - a gui frontend to gdb
GNU General Public License v3.0
2.13k stars 69 forks source link

Trim contents of seer releases made by github. #83

Closed epasveer closed 2 years ago

epasveer commented 2 years ago

When creating a release for seer, github uses "git-archive". This includes everything in the project tree.

Look at using a .gitattributes file (at the project top-leve) to trim away the non-relevant parts of the Seer project tree. (eg: tests/)

This can be tested by using git-archive manually.

% git archive --format=tar --prefix=git-v0.0.1/ v0.0.1 | gzip > ../deploy/git-v0.0.1.tar.zip
epasveer commented 2 years ago

For reference.

https://stackoverflow.com/questions/5524731/git-ignoring-gitattributes-pattern

epasveer commented 2 years ago

This works well to trim a release.

From my notes.

erniep@gracie:/peak/src/seer/notes$ more README.github 

#
# To manually create a tar file of Seer release (something that GitHub would create), run these commands.
#

    % cd seer/
    % git archive --format=tar.gz --prefix=seer-1.9/ HEAD > ~/seer-1.9.tar.gz

# git archive looks at this file for a list of files and directories to exclude.

    seer/.gitattributes

The .gitattributes file looks like:

erniep@gracie:/peak/src/seer$ more .gitattributes 

.gitattributes  export-ignore
.gitignore      export-ignore
.github/        export-ignore

debian/         export-ignore
icons/          export-ignore
images/         export-ignore
notes/          export-ignore
scripts/        export-ignore
tests/          export-ignore

With the .gitattributes file, the GitHub release mechanism will trim each release.

epasveer commented 2 years ago

Closing this task.

epasveer commented 2 years ago

Had to re-add this. It's needed to the CI/CD pipeline.

.github