Draft
Conversation
Allow users to install plugins directly from HTTPS git URLs instead of requiring them to be registered in the bower registry. Supports optional branch/tag refs via URL#ref syntax.
…Infos) Ensure git-sourced plugins survive framework updates by correctly serialising them as URLs when caching. Split URL#ref when reading manifest entries. Route git plugins through fetchSourceInfo instead of fetchBowerInfo in getPluginUpdateInfos.
Add lib/util/gitClone.js as a low-level promise wrapper around git clone, and lib/integration/PluginManagement/clone.js for the higher-level "clone plugin and write .bower.json metadata" operation. Refactor Plugin.js and Target.js to use these instead of inline exec calls.
Update the dev-mode clone install in Target.js and the framework
clone in AdaptFramework/clone.js to use the shared gitClone utility,
eliminating all inline exec('git clone ...') calls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New
adapt install https://github.com/user/plugin.git)#refsuffix (adapt install https://github.com/user/plugin.git#v2.0.0)adapt.jsonwith the full git URLadapt update, which re-clones HEAD from the stored URL(git)label in install/update summariesFix
api.js):updateFrameworknow correctly caches/restores git plugins,getPluginUpdateInfosroutes git plugins throughfetchSourceInfoinstead offetchBowerInfo, and manifest reading properly splitsURL#refentriesChore
lib/util/gitClone.js(low-level promise wrapper) andlib/integration/PluginManagement/clone.js(clone plugin + write.bower.jsonmetadata), mirroring the existingAdaptFramework/clone.jspatternexec('git clone ...')calls to the sharedgitCloneutility — the dev-mode clone install inTarget.jsand the framework clone inAdaptFramework/clone.js— so all git clone operations go through a single code pathFixes #237
Testing
adapt install https://github.com/<user>/<adapt-plugin>.git— should clone and installadapt install https://github.com/<user>/<adapt-plugin>.git#v1.0.0— should clone and checkout tagadapt.jsonstores the git URL as the dependency valuesrc/<type>/<name>/.bower.jsonhas_wasInstalledFromGitRepo: trueand_gitUrladapt update <plugin-name>— should re-clone and update from stored URLadapt update --dry-run— should show git plugins as updateable with(git)labeladapt installfromadapt.jsonshould re-install git plugins from stored URLsapi.updateFramework()should preserve git plugins through a framework reinstallapi.getPluginUpdateInfos()should return info for git-installed pluginsadapt install --dev <plugin>should still clone from bower registry URL (existing behaviour)