Sha256: 2acba7a37539a279c7116d2e026735e65fc1e878d6145a7f99b185faebf79fea

Contents?: true

Size: 747 Bytes

Versions: 10

Compression:

Stored size: 747 Bytes

Contents

# frozen_string_literal: true

require "sod"
require "versionaire"

module Milestoner
  module CLI
    module Actions
      module Build
        # Handles build version.
        class Version < Sod::Action
          include Import[:settings, :logger]

          using Versionaire::Cast

          description "Set version."

          ancillary "Calculated from commit trailers when not supplied."

          on %w[-v --version], argument: "[VERSION]"

          default { Container[:settings].project_version }

          def call version = default
            settings.project_version = Version version
          rescue Versionaire::Error => error
            logger.error { error.message }
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
milestoner-18.11.0 lib/milestoner/cli/actions/build/version.rb
milestoner-18.10.0 lib/milestoner/cli/actions/build/version.rb
milestoner-18.9.0 lib/milestoner/cli/actions/build/version.rb
milestoner-18.8.0 lib/milestoner/cli/actions/build/version.rb
milestoner-18.7.0 lib/milestoner/cli/actions/build/version.rb
milestoner-18.6.0 lib/milestoner/cli/actions/build/version.rb
milestoner-18.5.0 lib/milestoner/cli/actions/build/version.rb
milestoner-18.4.0 lib/milestoner/cli/actions/build/version.rb
milestoner-18.3.0 lib/milestoner/cli/actions/build/version.rb
milestoner-18.2.0 lib/milestoner/cli/actions/build/version.rb