Sha256: daa743728f2506689c7eb0876e14a77fc8f517f12e8501b07079179031ab3c9f

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true
require 'optparse'
require_relative '../lib/release_me/bump_version'

options = {}
OptionParser.new do |opts|
  opts.banner = "Usage: #{__FILE__} [options]"

  opts.on('-j', '--json', 'Output as JSON') do
    options[:json] = true
  end

  opts.on('-n', '--noop', 'Perform a Dry Run') do
    options[:dry_run] = true
  end

  opts.on('-t', '--use-time', 'Use the time as the version') do
    options[:version] ||= :time
  end

  opts.on('-c', '--use-commit', 'Use the commit checksum as the version') do
    options[:version] ||= :commit
  end

  opts.on('-v', '--version-string VER', 'The version string to use') do |arg|
    options[:version] = arg
  end

  opts.on('-p', '--path_of_project PATH', "Project path, defaults to: #{Dir.pwd}") do |arg|
    options[:project_path] = arg || Dir.pwd
  end

  # opts.on('-a', '--adapter-type ADAPTER', 'The adapter type in order to bump the correct file') do |arg|
  #   options[:adapter] = arg
  # end

  opts.on('-h', '--help', 'Prints this help') do
    puts opts
    exit 1
  end
end.parse!

instance = ReleaseMe::BumpVersion.new(options)
puts instance.run

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
release_me-0.1.4 exe/bump_version
release_me-0.1.3 exe/bump_version
release_me-0.1.2 exe/bump_version
release_me-0.1.1 exe/bump_version