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

release tarballs don't include submodules #317

Closed
nzanepro opened this issue Nov 22, 2019 · 4 comments
Closed

release tarballs don't include submodules #317

nzanepro opened this issue Nov 22, 2019 · 4 comments

Comments

@nzanepro
Copy link

Hi,

If I download a release tar.gz (i.e. v1.36.4.tar.gz), and run cmake to build and include the option to build the viewer, it fails with this error:

CMake Error at source/MaterialXView/CMakeLists.txt:2 (message):
  Building the MaterialX viewer requires the NanoGUI submodule to be present.
  Update your repository by calling the following:

  git submodule update --init --recursive


-- Configuring incomplete, errors occurred!

Building from a git clone works great.

Is there a way the submodules could be included with the release tar.gz files?

Thanks,
Zach

@jstone-lucasfilm
Copy link
Member

Hi Zach,

If there's a straightforward way to include submodules in GitHub releases, I'd support making this change, but I haven't yet encountered a good solution for this. Here's a related post on the GitHub community forum, which puts this in the category of feature requests for GitHub:

https://github.community/t5/How-to-use-Git-and-GitHub/Create-Release-that-contains-submodule/td-p/12073

All the best,

-Jonathan

@nzanepro
Copy link
Author

nzanepro commented Dec 1, 2019

Hi Jonathan,

So after some digging around and finding a ton of other people wanting the same feature, you are correct, there is no straightforward way to do it.

So I made a way (which hopefully proves good+easy+standalone) to do it here (including the module's source):
https://github.com/nzanepro/git-archive-submodules
(cd to your repo root, run git-archive-submodules.sh from the repo above, voila!)

I've forked this repo and tested adding the resultant tar.gz here:
https://github.com/nzanepro/MaterialX/releases/tag/v1.36.4-including-submodules

It's simple to add the tar.gz that is output from the git-archive-submodules to the release on the web interface of GitHub. This looks like a great way to automate the upload with the tagged release:
https://github.com/itchio/gothub

This is the piece I needed to get the homebrew formula for MaterialX working, which is now available here:
https://github.com/nzanepro/homebrew-usd
(install homebrew on macOS, then brew install nzanepro/usd/materialx)

I'm working my way through all the usd dependencies so we can have a full homebrew install of the usd stack. If you decide to incorporate this into your release system, please let me know and I'll delete my fork of MaterialX and repoint homebrew to your release. Maybe I can see if I can work this into GitHub somehow... :-)

Thanks
Zach

@jstone-lucasfilm
Copy link
Member

Thanks for this excellent follow-up, Zach, and we'll give your script a try for our next release!

@jstone-lucasfilm
Copy link
Member

dghart added a commit to dghart/debian-salsa-codelite-clone that referenced this issue Feb 5, 2023
Codelite now uses git submodules. The tarball was previously created
automatically by github from the '17.0.0'-tagged commit. However github fails
to notice submodules, so their code fails to be included in the tarball: see e.g.
AcademySoftwareFoundation/MaterialX#317
As a workaround, upstream has provided a tarball on www.4pane.co.uk.
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

No branches or pull requests

2 participants