diff options
author | Heiko Bernlöhr <Heiko.Bernloehr@FreeIT.de> | 2021-12-16 21:00:33 +0100 |
---|---|---|
committer | Heiko Bernlöhr <Heiko.Bernloehr@FreeIT.de> | 2022-09-15 09:54:09 +0200 |
commit | fdacc0b6be33dfe1db0b5a01f578b43b10185631 (patch) | |
tree | 880375ad8452b970e642f1d2536433d6cf8e6f72 /bin | |
parent | 8b7cb6b761741a201044be076bd75eb0e28566b9 (diff) | |
download | ecs-fdacc0b6be33dfe1db0b5a01f578b43b10185631.tar.gz ecs-fdacc0b6be33dfe1db0b5a01f578b43b10185631.zip |
Rails 5.2.6
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bundle | 2 | ||||
-rwxr-xr-x | bin/setup | 6 | ||||
-rwxr-xr-x | bin/update | 6 | ||||
-rwxr-xr-x | bin/yarn | 11 |
4 files changed, 20 insertions, 5 deletions
@@ -1,3 +1,3 @@ #!/usr/bin/env ruby -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) load Gem.bin_path('bundler', 'bundle') @@ -1,10 +1,9 @@ #!/usr/bin/env ruby -require 'pathname' require 'fileutils' include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") @@ -18,6 +17,9 @@ chdir APP_ROOT do system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') + # Install JavaScript dependencies if using Yarn + # system('bin/yarn') + # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') # cp 'config/database.yml.sample', 'config/database.yml' @@ -1,10 +1,9 @@ #!/usr/bin/env ruby -require 'pathname' require 'fileutils' include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") @@ -18,6 +17,9 @@ chdir APP_ROOT do system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') + # Install JavaScript dependencies if using Yarn + # system('bin/yarn') + puts "\n== Updating database ==" system! 'bin/rails db:migrate' diff --git a/bin/yarn b/bin/yarn new file mode 100755 index 0000000..460dd56 --- /dev/null +++ b/bin/yarn @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +APP_ROOT = File.expand_path('..', __dir__) +Dir.chdir(APP_ROOT) do + begin + exec "yarnpkg", *ARGV + rescue Errno::ENOENT + $stderr.puts "Yarn executable was not detected in the system." + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" + exit 1 + end +end |