-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
40 lines (35 loc) · 995 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require 'rake'
namespace :gem do
desc "Install the gem locally"
task :install do
puts "Building gem"
`gem build circonus.gemspec`
puts "Installing gem"
`sudo gem install ./circonus-*.gem`
puts "Removing built gem"
`rm circonus-*.gem`
end
desc "Push gem upstream"
task :push do
version = `awk -F \\\" ' /version/ { print $2 } ' circonus.gemspec`
version.chomp!
puts "Building circonus gem"
system "gem build circonus.gemspec"
puts "Pushing circonus gem version: #{version}"
system "gem push circonus-#{version}.gem"
puts "Cleaning up circonus-#{version}.gem"
File.delete "circonus-#{version}.gem"
# To yank:
#gem yank circonus -v ${VERSION}
end
end
namespace :git do
desc "make a git tag"
task :tag do
version = `awk -F \\\" ' /version/ { print $2 } ' circonus.gemspec`
version.chomp!
puts "Tagging git with version=#{version}"
system "git tag #{version}"
system "git push --tags"
end
end