-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up the build and publish tasks
- Loading branch information
Showing
1 changed file
with
9 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |