Skip to content

Commit

Permalink
feat: Update rakes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier-IV committed Sep 7, 2023
1 parent 4c4f544 commit 228fa55
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ gem 'rake', '~> 13.0'

gem 'colorize', '~> 1.1'

gem 'dry-cli', '~> 1.0'

gem 'bump', '~> 0.10.0'

group :development, :test do
gem 'minitest', '~> 5.19'
gem 'mocha', '~> 2.1'
gem 'rubocop', '~> 1.56'
end

gem 'dry-cli', '~> 1.0'

gem 'mocha', '~> 2.1'
31 changes: 31 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,41 @@
# frozen_string_literal: true

require 'rake/testtask'
require 'bump/tasks'

Rake::TestTask.new do |t|
t.libs << 'test'
end

desc 'Run tests'
task default: :test

desc 'Run the Windclutter executable'
task :windclutter, [:args] do
args = ARGV[1..] # Capture all arguments after the task name
begin
cmd = "ruby -Ilib ./bin/windclutter #{args.join(' ')}"
sh cmd
ensure
exit 0
end
end

namespace :gem do
desc 'Build the gem'
task :build do
sh 'gem build windclutter.gemspec'
end

desc 'Push the latest gem that was built.'
task :push do
gem_file = Dir.glob('*.gem').max_by { |f| File.mtime(f) }

if gem_file.nil?
puts 'No gem file found in the current directory.'
else
puts "Pushing gem: #{gem_file}"
sh "gem push #{gem_file}"
end
end
end

0 comments on commit 228fa55

Please sign in to comment.