#!/usr/bin/env ruby # frozen_string_literal: true

require “fileutils”

# rockstart rebuild-script script generated by rockstart

# path to your application root. APP_ROOT = File.expand_path(“..”, __dir__)

def system!(*args)

system(*args) || abort("\n== Command #{args} failed ==")

end

FileUtils.chdir APP_ROOT do

puts "== Regenerating previous rockstart build =="
system! "bundle exec rails generate rockstart" \

<%-

class_options = all_class_options
flags = content_security_flags

-%>

<%- class_options.each_with_index do |class_option, index| -%>
         " <%= class_option %>"<%- if (index + 1) < class_options.size || flags.any? %> \<%- end %>

<%- end -%> <%- content_security_flags.each_with_index do |(flag, values), index| -%>

" <%= flag %> <%= values.join(" ") %>"<%- if (index + 1) < flags.size %> \<%- end %>

<%- end -%> end