Sha256: 36e7baf4aaa7cce229774baa5ad97bb7dbca2418b7b2abdc05b28242b6d0be2a

Contents?: true

Size: 740 Bytes

Versions: 2

Compression:

Stored size: 740 Bytes

Contents

module Phase
  module CLI
    class Build < Command

      command :build do |c|
        c.syntax = "phase build <version_number>"

        c.description = <<-EOS.strip_heredoc
          Builds a new Docker image of the latest committed code on the current branch. Tags the
          build with <version_number>.
        EOS

        c.action do |args, options|
          new(args, options).run
        end
      end

      attr_reader :version_number

      def initialize(args, options)
        super

        @version_number = args[0]

        fail "must specify version number" unless version_number
      end

      def run
        build = ::Phase::Deploy::Build.new(version_number)
        build.execute!
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phase-0.0.16.1 lib/phase/cli/build.rb
phase-0.0.16 lib/phase/cli/build.rb