Sha256: e23c6f55bd90f60880835ce7ce0ce65f69ddebffeeac26264c7216ae4fe5a426

Contents?: true

Size: 743 Bytes

Versions: 2

Compression:

Stored size: 743 Bytes

Contents

# frozen_string_literal: true

module Neptuno
  module CLI
    # Init Neptuno files

    class Clone < Dry::CLI::Command
      desc 'Clone a neptuno compliant project'
      def call(**options)
        git_url = options[:args].first
        args_path = options[:args].second
        path = args_path || git_url.split('/').last.split('.').first
        `git clone --recurse-submodules #{git_url} #{path}`
        sleep(1)
        `cd #{path} && neptuno services update -am`
        puts "Building Docker images"
        `cd #{path} && neptuno build -a`
        puts "Starting Docker containers"
        `cd #{path} && neptuno up -a`
        puts "Starting service processes"
        `cd #{path} && neptuno start -a`
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
neptuno-1.0.10 lib/neptuno/cli/clone.rb
neptuno-1.0.9 lib/neptuno/cli/clone.rb