Skip to content

Commit

Permalink
Clean up the build and publish tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
waferbaby committed Sep 27, 2023
1 parent b414476 commit cd1d45f
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
# frozen_string_literal: true

require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec) do |task|
task.pattern = Dir["spec/**/*.rb"]
end

task default: :spec

desc "Build the gem"
task :build do
Rake::Task["cleanup"].invoke
puts `gem build dimples.gemspec`
sh "gem build dimples.gemspec"
end

desc "Publish the gem to rubygems.org"
task :publish do
puts `gem push dimples*.gem`
Rake::Task["cleanup"].invoke
end
require_relative "lib/dimples/version"

version = Dimples::VERSION
filename = "dimples-#{version}.gem"

task :cleanup do
FileUtils.rm(Dir["dimples*.gem"])
sh "gem push #{filename}"
sh "rm #{filename}"
end

0 comments on commit cd1d45f

Please sign in to comment.