karlfreeman / middleman-deploy

Deploy a middleman built site over rsync, ftp, stfp, or git (e.g. gh-pages on github).
MIT License
554 stars 124 forks source link

fixes #72, #91 — getting git remote url #140

Open alexanderadam opened 3 years ago

alexanderadam commented 3 years ago

Hi @karlfreeman,

I know that this likely won't be merged (I saw the list of open PRs) but maybe it will help someone else.

The problem with issues #72 and #91 was, that the subrepository in the build directory can only be initialized the first time because there's no other git repository in the build folder yet. Afterwards get_remote_url will only get the data from git repository of the build folder, which might have a totally different origin name or url. Thus the chdir('..') to get to the main repository again.

The dependencies really should be updated, too (but somebody else already took care on on this).