lib/mortar/command/plugins.rb in mortar-0.10.1 vs lib/mortar/command/plugins.rb in mortar-0.11.0
- old
+ new
@@ -29,26 +29,32 @@
else
display("You have no installed plugins.")
end
end
- # plugins:install git@github.com:user/repo.git
+ # plugins:install GIT_URL
#
# install a plugin
#
- #Example:
+ # -b, --branchname BRANCHNAME # Install plugin from a specific branch.
#
+ # Examples:
+ #
# $ mortar plugins:install https://github.com/mortardata/watchtower.git
# Installing watchtower... done
#
def install
plugin = Mortar::Plugin.new(shift_argument)
validate_arguments!
action("Installing #{plugin.name}") do
begin
record_usage("plugin_install", plugin.name)
- plugin.install
+ if options[:branchname]
+ plugin.install(options[:branchname])
+ else
+ plugin.install
+ end
Mortar::Plugin.load_plugin(plugin.name)
rescue StandardError => e
error e.message
end
end