Sha256: 87b45454fec14b8922183be1c3a8221961c4bcd231175ceda6a133c7358ef20e

Contents?: true

Size: 803 Bytes

Versions: 1

Compression:

Stored size: 803 Bytes

Contents

#!/usr/bin/env ruby
require 'fileutils'
include FileUtils

APP_ROOT = File.expand_path('..', __dir__)

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

chdir APP_ROOT do
  puts '== Installing dependencies =='
  system! 'gem install bundler --conservative'
  system('bundle check') || system!('bundle install')

  system('bin/yarn')

  puts "\n== Copying sample files =="
  unless File.exist?('.env.local')
    cp '.env', '.env.local'
  end

  puts "\n== Preparing database and seeds =="
  system! 'bin/rake dev:prime'

  puts "\n== Removing old logs and tempfiles =="
  system! 'bin/rails log:clear tmp:clear'

  puts "\n== Restarting application server =="
  system! 'bin/rails restart'

  puts "\n== Activating overcommit =="
  system! 'bin/overcommit --install'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
welaika-suspenders-2.29.0.alpha.2 templates/bin_setup