plushu / plushu-apps

Miscellaneous app management commands
MIT License
0 stars 0 forks source link

apps:clone #5

Open stuartpb opened 10 years ago

stuartpb commented 10 years ago

So, the thing about this: it is git-specific (it's basically git-receive-app in a can). I don't know of a tool that would allow us to check what the version control system of a remote URL is: if I did, then I would probably use it (and it would probably move apps:clone into its own plugin, since it breaks the pattern used by every other command in apps).

stuartpb commented 10 years ago

This could be named apps:git-clone (also distinguishes it from apps:fork).

stuartpb commented 10 years ago

It's possible to check if an HTTP(S) URL is Git with git ls-remote.

stuartpb commented 10 years ago

I'm thinking now about calling this apps:install, to mirror plugins:install and services:install, and making a generic installation hook for installation.

This also highlights an interesting thing: there are two classes of things that have a backing Git store in Plushu - repo-backed (apps) and repo-based directories (plugins). They're not unified, because you push apps but pull plugins.

(Services/addons is a really interesting intersection of apps and plugins - for the purposes of this classification, they're more like plugins, but they have the directory-backed basis seen with apps.)

Merging these would be stupid ("hey, look, I just clobbered the trace plugin by pushing an app with the same name!"), but they can share some common code...

stuartpb commented 10 years ago

I'm looking at making a hook for plugins (that will be reused for services) that will check a URL for transports (anybody using the hook should do it ordered) and, if it finds it, outputs its type and creates the directory (other plugins would then see the directory exists and skip their attempt).

I might make a similar hook (to accompany the hook in the same plugins) for installing any available transport to the appropriate directories in repos. (Any hook finding it would plushook create-repo first, to create all the supported formats.) The plushooker would then be responsible for handling the result (either performing an action for each valid transport obtained by, or just performing it for the highest one).

Other installers (beyond the obvious VCS ones) can be curl-tar-install and wget-dir-install (Plushu can pull git-install and curl-tar-install).

stuartpb commented 10 years ago

Actually, I'm thinking now that the Git install hooks will be part of the main plushu-git plugin.