Sha256: c6b7aafdf2e91d5f4bd7e71967a1042a163274a6a0c353f203145de4c9863925

Contents?: true

Size: 691 Bytes

Versions: 3

Compression:

Stored size: 691 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))

if [nil, '0', 'no', 'false'].include?(ENV['SCHMERSION_DISABLE_AUTO_BUNDLE_EXEC'])
  require 'schmersion/auto_bundle_exec'
  Schmersion::AutoBundleExec.when_bundled(:schmersion)
end

require 'schmersion'
require 'swamp/cli'
require 'git'
require 'colorize'

begin
  cli = Swamp::CLI.new(:schmersion, version: Schmersion::VERSION)
  cli.load_from_directory(File.expand_path('../cli', __dir__))
  cli.dispatch(ARGV.empty? ? ['help'] : ARGV)
rescue Swamp::Error, Git::GitExecuteError, Schmersion::Error => e
  warn "\e[31mError: #{e.message}\e[0m"
  exit 2
rescue Interrupt
  exit 3
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
schmersion-1.1.3 bin/schmersion
schmersion-1.1.2 bin/schmersion
schmersion-1.1.0 bin/schmersion