Files
fizzy/bin/setup
T
Mike Dalessio 8e0cb930af Delete SignalId concerns from the codebase
including Signup for now, will rebuild it with just QB
2025-10-03 14:06:51 -04:00

25 lines
729 B
Ruby
Executable File

#!/usr/bin/env ruby
def system!(*args) system(*args, exception: true) end
puts "\n== Installing Ruby and Node =="
system("mise install -y")
puts "\n== Installing dependencies =="
system("gem install bundler --conservative")
system("bundle config set --local auto_install true")
system("bundle check") || system!("bundle install")
require_relative "../lib/bootstrap"
load File.expand_path("../gems/fizzy-saas/bin/setup", __dir__) unless Bootstrap.oss_config?
puts "\n== Preparing database =="
if ARGV.include?("--reset")
system! "bin/rails db:drop db:create db:schema:load db:prepare db:seed"
else
system! "bin/rails db:prepare"
end
puts "\n== Removing old logs and tempfiles =="
system! "bin/rails log:clear tmp:clear"