Sha256: 45b115235e9d7c6a641a64e84307f860f1169f959aea4f1138a37777d9b3bcbe

Contents?: true

Size: 1.12 KB

Versions: 10

Compression:

Stored size: 1.12 KB

Contents

#!/usr/bin/env ruby

# frozen_string_literal: true

require 'rainbow/refinement'
require 'slop'
require_relative '../lib/runger_release_assistant.rb'

using Rainbow

slop_options =
  Slop.parse do |o|
    o.banner = <<~BANNER

      Usage: release [options]

      Example:
        release
        release --type minor
        release -t patch
    BANNER

    RungerReleaseAssistant.define_slop_options(o)

    o.on('-i', '--init', 'create a `.release_assistant.yml` config file') do
      File.write(
        '.release_assistant.yml',
        YAML.dump(RungerReleaseAssistant::DEFAULT_OPTIONS.stringify_keys),
      )
      puts("Created #{'.release_assistant.yml'.green.bold}!")
      exit
    end

    o.on('-v', '--version', 'print the version') do
      puts(RungerReleaseAssistant::VERSION)
      exit
    end

    o.on('-h', '--help', 'print this help information') do
      puts(o)
      exit
    end
  end

config_file_options = RungerReleaseAssistant::ConfigFileReader.new.options_hash

RungerReleaseAssistant.new(
  RungerReleaseAssistant::DEFAULT_OPTIONS.
    merge(config_file_options).
    merge(slop_options.to_h),
).run_release

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
runger_release_assistant-0.14.0 exe/release
runger_release_assistant-0.13.0 exe/release
runger_release_assistant-0.12.0 exe/release
runger_release_assistant-0.11.0 exe/release
runger_release_assistant-0.10.0 exe/release
runger_release_assistant-0.9.0 exe/release
runger_release_assistant-0.8.0 exe/release
runger_release_assistant-0.7.0 exe/release
runger_release_assistant-0.6.0 exe/release
runger_release_assistant-0.5.0 exe/release