lib/polyn/cli.rb in polyn-cli-0.1.0 vs lib/polyn/cli.rb in polyn-cli-0.1.1
- old
+ new
@@ -62,23 +62,30 @@
run "git init"
end
say "Repository initialized"
end
+ method_option :dir, default: Dir.getwd
desc "tf_init", "Initializes Terraform for configuration"
def tf_init
say "Initializing Terraform"
inside File.join(options.dir, "tf") do
run "terraform init"
end
end
desc "up", "updates the JetStream streams and consumers, as well the Polyn event registry"
def up
+ if polyn_env == "development"
+ say "Starting NATS"
+ run "docker compose up --detach"
+ end
+
say "Updating JetStream configuration"
inside "tf" do
run tf_apply
end
+
say "Updating Polyn event registry"
Polyn::Cli::SchemaLoader.new(self).load_events
end
private