lib/faastruby/cli/commands/function/deploy_to.rb in faastruby-0.5.19 vs lib/faastruby/cli/commands/function/deploy_to.rb in faastruby-0.5.20
- old
+ new
@@ -97,10 +97,12 @@
# have maximum size of 4KB.
--context-from-stdin # Read context data from STDIN.
--set-root # Set the function as the root route for the workspace.
--set-catch-all # Set the function as the catch-all route for the workspace.
--dont-create-workspace # Don't try to create the workspace if it doesn't exist.
+--skip-dependencies # Don't try to install Gems or Shards before creating
+ # the deployment package
)
end
private
@@ -118,19 +120,19 @@
puts ' Done!' unless spinner&.success
end
end
def shards_install
- return true unless File.file?('shard.yml')
+ return true unless File.file?('shard.yml') && @options['skip_dependencies'].nil?
# puts "[#{@function_name}] Verifying dependencies" unless @options["quiet"]
system('shards check > /dev/null') || system('shards install')
rescue Errno::EPIPE
true
end
def bundle_install
- return true unless File.file?('Gemfile')
+ return true unless File.file?('Gemfile') && @options['skip_dependencies'].nil?
# puts "* [#{@function_name}] Verifying dependencies" unless @options["quiet"]
system('bundle check >/dev/null') || system('bundle install')
rescue Errno::EPIPE
true
end
@@ -183,9 +185,11 @@
@options['is_root'] = true
when '--set-catch-all'
@options['is_catch_all'] = true
when '--dont-create-workspace'
@options['dont_create_workspace'] = true
+ when '--skip-dependencies'
+ @options['skip_dependencies'] = true
else
FaaStRuby::CLI.error("Unknown argument: #{option}")
end
end
end