_docker/control.rb
#
# Copies the project root Gemfile and Gemfile.lock into the _docker/awestruct
# directory if they have changed since the last run of this script. This ensures
# that when the Awestruct image is built, it always contains the most up-to-date
# project dependencies.
#
Copies the project root Gemfile and Gemfile.lock into the _docker/awestruct
directory if they have changed since the last run of this script. This ensures
that when the Awestruct image is built, it always contains the most up-to-date
project dependencies.
Copies the project root Gemfile and Gemfile . lock into the _docker / awestruct directory if they have changed since the last run of this script . This ensures that when the Awestruct image is built it always contains the most up - to - date project dependencies .
def copy_project_dependencies_for_awestruct_image
  puts "- Copying project dependencies into '_docker/awestruct' for build..."
  parent_gemfile = File.open '../Gemfile'
  parent_gemlock = File.open '../Gemfile.lock'
  target_gemfile = FileHelpers.open_or_new('awestruct/Gemfile')
  target_gemlock = FileHelpers.open_or_new('awestruct/Gemfile.lock')
  FileHelpers.copy_if_changed(parent_gemfile, target_gemfile)
  FileHelpers.copy_if_changed(parent_gemlock, target_gemlock)
  puts "- Successfully copied project dependencies into '_docker/awestruct' for build."
end
def copy_project_dependencies_for_awestruct_image puts "- Copying project dependencies into '_docker/awestruct' for build..." parent_gemfile = File . open '../Gemfile' parent_gemlock = File . open '../Gemfile.lock' target_gemfile = FileHelpers . open_or_new ( 'awestruct/Gemfile' ) target_gemlock = FileHelpers . open_or_new ( 'awestruct/Gemfile.lock' ) FileHelpers . copy_if_changed ( parent_gemfile , target_gemfile ) FileHelpers . copy_if_changed ( parent_gemlock , target_gemlock ) puts "- Successfully copied project dependencies into '_docker/awestruct' for build." end
Copies the project root Gemfile and Gemfile.lock into the _docker/awestruct
directory if they have changed since the last run of this script.
Copies the project root Gemfile and Gemfile . lock into the _docker / awestruct directory if they have changed since the last run of this script .
#Only copy if the file has changed. Otherwise docker won't cache optimally