sct/lib/sct/commands_generator.rb in sct-0.1.35 vs sct/lib/sct/commands_generator.rb in sct-1.0.0
- old
+ new
@@ -15,54 +15,38 @@
program :summary, 'CLI helper tool for local SCT development'
program :description, 'SCT is a CLI tool for developers using the Visma Continuous Deployment Model in conjunction with the Google Cloud Platform (GCP). It provides multiple command to set up and maintain a kubernetes cluster on a machine for local development'
global_option('--verbose') { $verbose = true }
- command :init do |c|
- c.syntax = 'sct init'
- c.description = 'setup sct'
-
- c.action do |args, options|
- UI.important("setting up sct")
- Sct::InitCommand.new.execute(args, options)
- end
- end
-
- command :hostfile do |c|
-
- c.syntax = 'sct hostfile'
- c.description = 'patch hostfile with kubernetes ip'
-
- c.action do |args, options|
- UI.important("Trying to patch hosts file...")
- Sct::HostfileCommand.new.execute(args, options)
- end
- end
-
command :'mysql-proxy' do |c|
-
c.syntax = 'sct mysql-proxy'
c.description = 'setup google mysql proxy'
c.action do |args, options|
UI.important("Trying to setup mysql proxy")
- Sct::MysqlproxyCommand.new.execute(args, options)
+ Sct::MysqlproxyCommand.new.execute args, options
end
-
end
command :'cluster' do |c|
-
c.syntax = 'sct cluster'
c.description = 'make changes to the cluster'
-
end
command :'shell' do |c|
-
c.syntax = 'sct shell'
c.description = 'run commands from the shell using docker containers'
+ end
+ command :'dev' do |c|
+ c.syntax = 'sct dev'
+ c.description = 'start development container in the current directory'
+ c.option '--build', '(re)build image from Dockerfile before starting'
+ c.option '--pull', 'pull latest base image from Dockerfile before (re)building. only used in combination with --build flag'
+
+ c.action do |args, options|
+ Sct::DevCommand.new.execute args, options
+ end
end
run!
end
end