dolphins7.skeleton/cli/bin/twenty
0x1eef 2e8cf6e333 Drop 'twenty-' prefix from toplevel directories
The directories twenty-{server,client,cli} have been renamed to
not include 'twenty-'. The gems are still published with the twenty-
prefix, otherwise a collision is impossible to avoid. This commit makes
it slightly easier to generalize twenty.
2024-04-21 20:11:25 -03:00

35 lines
1,019 B
Ruby
Executable file

#!/usr/bin/env ruby
# frozen_string_literal: true
libdir = File.join(__dir__, "..", "lib")
require File.join(libdir, "twenty", "cli", "libexec")
case ARGV[0]
when "up"
wait spawn("up", *ARGV[1..])
exit $?.exitstatus
when "down"
wait spawn("down", *ARGV[1..])
exit $?.exitstatus
when "connect"
wait spawn("connect", *ARGV[1..])
exit $?.exitstatus
when "disconnect"
wait spawn("disconnect", *ARGV[1..])
exit $?.exitstatus
when "migrate"
wait spawn("migrate", *ARGV[1..])
exit $?.exitstatus
when "console"
wait spawn("console", *ARGV[1..])
exit $?.exitstatus
else
warn "Usage: twenty COMMAND [OPTIONS]\n\n" \
"Commands:\n" \
" 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" \
end