3Dickulus / FragM

Derived from https://github.com/Syntopia/Fragmentarium/
GNU General Public License v3.0
349 stars 30 forks source link

Submodules not included in archive generated by github #130

Closed 3Dickulus closed 4 years ago

3Dickulus commented 4 years ago

Describe the bug Submodules not included in archive generated by github

To Reproduce Steps to reproduce the behavior: Download Zip from Code page

Expected behavior A complete archive

Desktop (please complete the following information):

Additional context Travis build can create a complete archive at build time and tag as asset on releases page

3Dickulus commented 4 years ago

git clone --recursive gets all files to local repo

Travis can generate an archive before stepping in to build

3Dickulus commented 4 years ago

after some digging...

git archive -o release.zip HEAD
git submodule --quiet foreach 'cd $toplevel; zip -ru release.zip $sm_path'

creates a complete archive, no bash script needed, just 2 git commands, this creates release.zip with everything in the super-repo

3Dickulus commented 4 years ago

done, until github has a better option, there is an extra archive file with the release

claudeha commented 4 years ago

In my own projects I use git subtree instead of git submodule, more things "just work" with subtree, submodules cause lots of pain. Example with explanation: https://github.com/pure-data/pd-lib-builder/blob/master/tips-tricks.md#git-subtree (this is where I got the idea to use it from)

3Dickulus commented 4 years ago

hmmm... perhaps a noob's poor choice, converting from submodules to subtrees for the Examples hierarchy will just be part of my learning experience with github :P but for now I eat crow... of course github has a better option, submodules are for when you don't want to include a massive amount of other project code in your own repo or for using a pre-built install of something needed for compile, here is needed a smaller amount of code and it should be in the archived repo (duh!) and fortunately the users that have added repos as subfolders won't notice a thing.