Sha256: 57dade0ea528cd6b545d7990ea00e62d9e16f36083801edb59560eaddf1c2d31

Contents?: true

Size: 733 Bytes

Versions: 10

Compression:

Stored size: 733 Bytes

Contents

# frozen_string_literal: true

require "milestoner"
require "refinements/struct"
require "sod"

module Rubysmith
  module CLI
    module Actions
      # Publishes project.
      class Publish < Sod::Action
        include Import[:input]

        using ::Refinements::Struct

        description "Publish milestone."

        on %w[-p --publish], argument: "[VERSION]"

        default { Milestoner::Commits::Versioner.new.call }

        def initialize(extension: Extensions::Milestoner, **)
          super(**)
          @extension = extension
        end

        def call(version = nil) = extension.call input.merge(project_version: version || default)

        private

        attr_reader :extension
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubysmith-6.10.0 lib/rubysmith/cli/actions/publish.rb
rubysmith-6.9.0 lib/rubysmith/cli/actions/publish.rb
rubysmith-6.6.0 lib/rubysmith/cli/actions/publish.rb
rubysmith-6.5.0 lib/rubysmith/cli/actions/publish.rb
rubysmith-6.4.0 lib/rubysmith/cli/actions/publish.rb
rubysmith-6.3.0 lib/rubysmith/cli/actions/publish.rb
rubysmith-6.2.1 lib/rubysmith/cli/actions/publish.rb
rubysmith-6.2.0 lib/rubysmith/cli/actions/publish.rb
rubysmith-6.1.0 lib/rubysmith/cli/actions/publish.rb
rubysmith-6.0.0 lib/rubysmith/cli/actions/publish.rb