FreeCAD / FreeCAD-addons

A convenient gathering of useful and well-developed FreeCAD plugins made by the community.
769 stars 253 forks source link

Update the submodules so they are up to date with the HEAD of each addon #308

Closed luzpaz closed 1 month ago

luzpaz commented 2 months ago

See https://gist.github.com/luzpaz/c450aba42444d2d69ba75309f4cd1b60

I used to do this a regular basis but started running into issue. I don't recall what exactly. Maybe we can automate this process ?

luzpaz commented 1 month ago

I think we should do this before 1.0 release. When people view the addon repo and link to any specific addon, it links to the revision it was at the last time we updated submodules. They don't know that they need to explicitly click on refresh or HEAD to get the most up to date version of the repo. To limit confusion, we can update submodules to avoid this.

chennes commented 1 month ago

The long-term solution is to stop using submodules like this, since it's a sort of abuse of that system and doesn't work as one would expect. So I wouldn't spend much time on writing automation for it.

luzpaz commented 1 month ago

Ok, that makes sense. In that case, what is a longterm solution ?

chennes commented 1 month ago

Probably a JSON file instead of .gitmodules (at any rate, I just ran an update on them), via:

git submodule foreach 'git pull origin master || :'
git submodule foreach 'git pull origin main || :'

(obviously operating on the assumption that those are the only two branches we need concern ourselves with).

luzpaz commented 1 week ago

@chennes After changing maintainers for SearchBar (#https://github.com/FreeCAD/FreeCAD-addons/issues/330) I cant seem to run git submodule commands from github codespace. Screenshot_20241113_094156

Do you mind re-running ?

chennes commented 1 week ago

Hindsight is 20/20 -- using git submodules for this was a terrible, terrible idea. I will have to give this some thought, we've almost certainly just broken the Addon Manager's remote caching mechanism, and the installations of anyone who was using git to install SearchBar.