Sha256: b9e8a2462d3380019b925b0a9eb145d132a794f4b264626f952a8b739f12be3c

Contents?: true

Size: 986 Bytes

Versions: 1

Compression:

Stored size: 986 Bytes

Contents

# frozen_string_literal: true

require "bundler/gem_tasks"
require "rake/testtask"
require "rubocop/rake_task"
require_relative "lib/brew_lib"

Rake::TestTask.new(:test) do |t|
  t.libs << "test"
  t.libs << "lib"
  t.test_files = FileList["test/**/test_*.rb"]
end

RuboCop::RakeTask.new

def version
  `git describe --tags --abbrev=0`.chomp
end

desc "Create a new release, push and system install [patch|minor|major], default is patch"
task bump: [:test] do |_, args|
  part = args.to_a.fetch(0, "patch")
  sh "{ git add -A && git commit --quiet -m 'bump #{part}' >/dev/null &&
          gem bump --silent --quiet --tag --push --release &&
          gh release create $(git describe --tags --abbrev=0) --generate-notes &&
          sleep 10; gem install brew_lib -v $(git describe --tags --abbrev=0 | sed 's/v//g'); } || true"
end

task default: %i[test rubocop]

desc "Show tasks in current Rakefile, to see descriptions rake -T or rake -D"
task :tasks do
  sh "rake", "--tasks"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
brew_lib-0.1.16 Rakefile