lib/bolt/project_manager.rb
# Migrates a project to use the latest file versions and best practices.
#
Migrates a project to use the latest file versions and best practices.
Migrates a project to use the latest file versions and best practices .
def migrate
      unless $stdin.tty?
        raise Bolt::Error.new(
          "stdin is not a tty, unable to migrate project",
          'bolt/stdin-not-a-tty-error'
        )
      end
      @outputter.print_message("Migrating project #{@config.project.path}\n\n")
      @outputter.print_action_step(
        "Migrating a Bolt project might make irreversible changes to the project's "\
        "configuration and inventory files. Before continuing, make sure the "\
        "project has a backup or uses a version control system."
      )
      return 0 unless Bolt::Util.prompt_yes_no("Continue with project migration?", @outputter)
      @outputter.print_message('')
      ok = migrate_inventory && migrate_config && migrate_modules
      if ok
        @outputter.print_message("Project successfully migrated")
      else
        @outputter.print_error("Project could not be migrated completely")
      end
      ok ? 0 : 1
    end
def migrate unless $stdin . tty? raise Bolt :: Error . new ( "stdin is not a tty, unable to migrate project" , 'bolt/stdin-not-a-tty-error' ) end @outputter . print_message ( "Migrating project #{@config.project.path}\n\n" ) @outputter . print_action_step ( "Migrating a Bolt project might make irreversible changes to the project's " "configuration and inventory files. Before continuing, make sure the " "project has a backup or uses a version control system." ) return 0 unless Bolt :: Util . prompt_yes_no ( "Continue with project migration?" , @outputter ) @outputter . print_message ( '' ) ok = migrate_inventory && migrate_config && migrate_modules if ok @outputter . print_message ( "Project successfully migrated" ) else @outputter . print_error ( "Project could not be migrated completely" ) end ok ? 0 : 1 end
Migrates a project to use the latest file versions and best practices.
Migrates a project to use the latest file versions and best practices .