Sha256: ce714794be07ab82534f84386e4897264d8a4adba6fdf48c4656f93f01a84f42

Contents?: true

Size: 851 Bytes

Versions: 1

Compression:

Stored size: 851 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"
require "sod"
require "versionaire"

module Milestoner
  module CLI
    module Actions
      # Handles tag creation and pushing of tag to local repository.
      class Publish < Sod::Action
        include Import[:configuration]

        using Refinements::Struct
        using Versionaire::Cast

        description "Publish milestone."

        ancillary "Build, commit, tag, and push to remote repository."

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

        default { Commits::Versioner.new.call }

        def initialize(publisher: Tags::Publisher.new, **)
          super(**)
          @publisher = publisher
        end

        def call(version = nil) = publisher.call Version(version || default)

        private

        attr_reader :publisher
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
milestoner-17.0.0 lib/milestoner/cli/actions/publish.rb