dolphins7.skeleton/cli/bin/twenty

36 lines
1,013 B
Text
Raw Normal View History

#!/usr/bin/env ruby
2023-12-08 14:40:42 +01:00
# frozen_string_literal: true
libdir = File.join(__dir__, "..", "lib")
require File.join(libdir, "twenty", "cli", "libexec")
2023-12-08 14:40:42 +01:00
case ARGV[0]
when "up"
wait spawn("up", *ARGV[1..])
exit $?.exitstatus
when "down"
wait spawn("down", *ARGV[1..])
exit $?.exitstatus
2023-12-08 19:27:00 +01:00
when "connect"
wait spawn("connect", *ARGV[1..])
exit $?.exitstatus
when "disconnect"
wait spawn("disconnect", *ARGV[1..])
exit $?.exitstatus
2023-12-23 20:02:16 +01:00
when "migrate"
wait spawn("migrate", *ARGV[1..])
exit $?.exitstatus
2023-12-26 03:12:57 +01:00
when "console"
wait spawn("console", *ARGV[1..])
exit $?.exitstatus
2023-12-08 14:40:42 +01:00
else
2024-03-11 18:45:11 +01:00
warn "Usage: twenty COMMAND [OPTIONS]\n\n" \
2023-12-08 14:40:42 +01:00
"Commands:\n" \
2024-04-25 08:04:11 +02:00
" up Start the twenty web server\n" \
" down Stop the twenty web server\n" \
" connect Connect a project to twenty\n" \
" disconnect Disconnect a project from twenty\n" \
" migrate Migrate the database\n" \
" console Start the twenty developer console\n" \
2023-12-08 14:40:42 +01:00
end