Sha256: ccf77242f9296adfda7604696422c35493805b728b27588776781396e29e88b1

Contents?: true

Size: 843 Bytes

Versions: 10

Compression:

Stored size: 843 Bytes

Contents

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

require 'pathname'
require 'fileutils'
include FileUtils # rubocop:disable Style/MixinUsage

# path to your application root.
APP_ROOT = Pathname.new File.expand_path('..', __dir__)

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

chdir APP_ROOT do
  # This script is a way to update your development environment automatically.
  # Add necessary update steps to this file.

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

  puts "\n== Updating database =="
  system! 'bin/rails db:migrate'

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
search_object_graphql-1.0.5 example/bin/update
search_object_graphql-1.0.4 example/bin/update
search_object_graphql-1.0.3 example/bin/update
search_object_graphql-1.0.2 example/bin/update
search_object_graphql-1.0.1 example/bin/update
search_object_graphql-1.0.0 example/bin/update
search_object_graphql-0.3.2 example/bin/update
search_object_graphql-0.3.1 example/bin/update
search_object_graphql-0.3 example/bin/update
search_object_graphql-0.2 example/bin/update