bin/appbundle-updater in appbundle-updater-1.0.0 vs bin/appbundle-updater in appbundle-updater-1.0.1
- old
+ new
@@ -117,11 +117,11 @@
dest = nil
end
end
end
-App = Struct.new(:name, :repo, :bundle_without, :install_command, :gems) do
+App = Struct.new(:name, :repo, :bundle_without, :install_commands, :gems) do
def initialize(*)
super
self.gems ||= {}
end
@@ -145,12 +145,12 @@
"#{bin_dir.join("rake")} install"
),
App.new(
"chef",
"chef/chef",
- "development docgen chefstyle",
- "#{bin_dir.join("bundle")} install --without server,docgen,maintenance,pry,travis,integration,ci,chefstyle",
+ "server docgen maintenance pry travis integration ci chefstyle",
+ chef_install_command,
{
"chef" => %w{server docgen maintenance pry travis integration ci chefstyle},
"chef-bin" => %w{server docgen maintenance pry travis integration ci chefstyle},
"ohai" => %w{server docgen maintenance pry travis integration ci chefstyle},
"inspec-core-bin" => %w{server docgen maintenance pry travis integration ci chefstyle},
@@ -214,20 +214,21 @@
"#{bin_dir.join("rake")} install"
),
].freeze
class Updater
- attr_reader :app, :ref, :tarball, :repo, :gems
+ attr_reader :app, :ref, :tarball, :repo, :gems, :install_commands
def initialize(options)
@app = options[:app]
@ref = options[:ref]
@tarball = options[:tarball]
@extra_bin_files = options[:extra_bin_files]
@binstubs_source = options[:binstubs_source]
@repo = options[:repo] || @app.repo
@gems = @app.gems
+ @install_commands = @app.install_commands
end
def start
if !windows? && Process.uid != 0
abort "#{$0} needs to be run as root user or with sudo"
@@ -279,10 +280,12 @@
ruby(cmd)
end
banner("Installing gem")
Dir.chdir(app_dir) do
- ruby("#{bin_dir.join("bundle")} exec #{app.install_command}")
+ Array(install_commands).each do |command|
+ ruby("#{bin_dir.join("bundle")} exec #{command}")
+ end
end
banner("Updating appbundler binstubs for #{app}")
if gems.empty?
Dir.chdir(app_dir) do