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

Clone submodules #349

Closed
limikael opened this issue Jan 23, 2016 · 7 comments
Closed

Clone submodules #349

limikael opened this issue Jan 23, 2016 · 7 comments

Comments

@limikael
Copy link
Contributor

It would be great if plugins installed using github-updater would also cloe submodules of the installed plugins. When using git from the command line, submodules are included be using git clone --recursive. Not sure if github-updater uses the command line version of git internally or if it uses some other magic way. More info on submodules: http://stackoverflow.com/questions/3796927/how-to-git-clone-including-submodules

This is mainly to start a discussion. If you like the idea, maybe I can submit a PR...

@afragen
Copy link
Owner

afragen commented Jan 23, 2016

GHU uses the WordPress core methods for updating. It doesn't use git clone. It acts just like when you would download a repository from GitHub and unfortunately that doesn't sync and download submodules.

Most users would not have git running on their shared hosts anyway.

There is a way. For each tagged release you could create a release asset that includes the submodules. GHU will use a release asset if it sees one.

@limikael
Copy link
Contributor Author

Ok makes sense... Thanks for the quick reply, closing this for now...

@unfresco
Copy link

There is a way. For each tagged release you could create a release asset that includes the submodules. GHU will use a release asset if it sees one.

I have not been able to get it working at wherever-content plugin. I think the attached asset has the correct spelling but It still only pulls from the repo without the submodules, not the .zip file where I have them included. Thanks for any hint!

@afragen
Copy link
Owner

afragen commented Jun 24, 2019

You must include the header Release Asset: true in the plugin.

@unfresco
Copy link

First try with a theme didn’t work out… I understand that magic happens here? And that an alternative to retrieving from a release asset would be through the github_updater_post_construct_download_link filter?

@unfresco
Copy link

Looking into the received $headers at https://github.com/afragen/github-updater/blob/1550833b6f5084ca2d9f4fa90a331baf10378adc/src/GitHub_Updater/Base.php#L896 the “Release Asset” key is empty so probably the error is on my side but what is wrong about https://github.com/unfresco/last2-theme/blob/6234837be70d960dbcfeddd1feb63bbc405baf93/style.css#L5 ?

@afragen
Copy link
Owner

afragen commented Jun 25, 2019

@unfresco so firstly it’s very difficult to follow when you have added new problems to an issue that has been closed for over 3 1/2 years. Please create a new issue or hit me up on Slack.

Second, I was able to install and update your theme successfully. To test I simply decreased the local version number to trigger an update notice.

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

3 participants