Class: Ufo::Upgrade::Upgrade4

Inherits:
Sequence
  • Object
show all
Includes:
Network::Helper
Defined in:
lib/ufo/upgrade/upgrade4.rb

Instance Method Summary collapse

Methods inherited from Sequence

source_paths

Instance Method Details

#already_ufo4_checkObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ufo/upgrade/upgrade4.rb', line 10

def already_ufo4_check
  if File.exist?("#{Ufo.root}/.ufo/settings/network/default.yml")
    puts "It looks like you already have a .ufo/settings/network/default.yml file in your project. The current folder already contains the new project structure for ufo version 4. Exiting without updating anything."
    exit
  end

  if !File.exist?("#{Ufo.root}/.ufo")
    puts "Could not find a ufo folder in your project at all. Maybe you want to run ufo init to initialize a new ufo project instead?"
    exit
  end
end

#final_messageObject



31
32
33
34
# File 'lib/ufo/upgrade/upgrade4.rb', line 31

def final_message
  puts "Upgrade complete.\n\n"
  new_env_info
end

#upgradeObject



22
23
24
25
26
27
28
29
# File 'lib/ufo/upgrade/upgrade4.rb', line 22

def upgrade
  puts "Upgrading structure of your current project to the new ufo version 4 project structure"
  upsert_dockerignore
  upsert_gitignore
  update_params_yaml
  update_task_definitions
  new_files
end