joomla / install-from-web-server

Repository holding the component powering the Install from Web server.
9 stars 31 forks source link

Low priority: Remove CMS code from repo #10

Closed nicksavov closed 7 years ago

nicksavov commented 9 years ago

Todo: Remove the CMS code from the repo and have the repo just be the Install from Web server.

wilsonge commented 9 years ago

Probably with a phing build script for the component giving a structure as similar as possible to https://github.com/joomla-extensions/weblinks

mbabker commented 7 years ago

@beat The ifw-only branch has been created using this git command:

git filter-branch --index-filter 'git rm --cached -qr --ignore-unmatch -- . && git reset -q $GIT_COMMIT -- administrator/components/com_apps administrator/language/en-GB/en-GB.com_apps.ini components/com_apps jedapps language/en-GB/en-GB.com_apps.ini layouts/joomla/apps' --prune-empty -- --all

This has retained the full commit history for the project's resources while removing all non-project related stuff. After a review, this branch should become the master branch.

beat commented 7 years ago

@mbabker Awesome! You've gotten a git-guru black belt! :-)

I have reviewed/diffed/joomla-installed-and-diffed the branches and there is one file that got removed too much:

.gitignore

and maybe also README.md.

That .gitignore fiel should stay and possibly have added all other Joomla-standard folders and files in it, that way, we can run just add a standard joomla install inside, and later, we could automate the server deployment directly from git master.

Could you please add that file back or make a new branch and make a MR from that branch to master ?

mbabker commented 7 years ago

I'll add them later. Literally all I did was run the command and push the branch so it seems none of the commits from your team touched those files or git got confused.

beat commented 7 years ago

@mbabker great, :+1: thanks! As all non-core-joomla code is identical, as soon as you added the .gitignore (and possibly the README.md) file back to https://github.com/joomla-extensions/install-from-web-server/tree/ifw-only and I have a PR from https://github.com/joomla-extensions/install-from-web-server/tree/ifw-only to https://github.com/joomla-extensions/install-from-web-server/tree/master will merge it.

mbabker commented 7 years ago

It can't be PR'd because the git history has been rewritten (all the commits are there, but all the SHAs have changed and non-relevant commits removed). So you would have to manually either delete the existing master branch or rename it to something else then delete it, followed by creating a new master branch by branching the ifw-only branch.

beat commented 7 years ago

@mbabker I looked into how to do this, but I don't think I have enough super-powers to be able to to do this (missing the "Settings" tab on this repository). I could do the first of the 2 pushing steps to rename master to old-master (there is now an old-master branch, but github refuses to delete the default branch:

$ git branch -m master old-master
$ git push origin :master old-master
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/joomla-extensions/install-from-web-server.git
 * [new branch]      old-master -> old-master
 ! [remote rejected] master (refusing to delete the current branch: refs/heads/master)
error: failed to push some refs to 'https://github.com/joomla-extensions/install-from-web-server.git'

So I need help from someone with admin rights, to set temporarly default branch to old-master, so I can delete master and rename ifw to master, then need help to set master as default branch again. Or of course get (at least temporary) access to the Settings tab to do it.

mbabker commented 7 years ago

I would just do a force push honestly.

git checkout ifw-only
git branch -D master
git checkout -b master
git push -f origin master
beat commented 7 years ago

okay, that was bruttaly efficient and worked! I also added back the .gitignore as is, so we have a working base.

Thanks @mbabker for your git-guru Kung Fu. :+1:

That closes this tracker. :smile: