-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathRakefile
More file actions
26 lines (20 loc) · 747 Bytes
/
Copy pathRakefile
File metadata and controls
26 lines (20 loc) · 747 Bytes
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
require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
desc "Open an irb session preloaded with this library"
task :console do
sh "irb -I lib -r presto/metrics.rb"
end
desc "Bump version, commit, tag, and push to trigger CI release. Usage: rake bump[X.Y.Z]"
task :bump, [:version] do |_, args|
version = args[:version] or raise "Usage: rake bump[X.Y.Z]"
file = "lib/presto/metrics/version.rb"
content = File.read(file).gsub(/VERSION = ".*"/, %(VERSION = "#{version}"))
File.write(file, content)
sh "git add #{file}"
sh "git commit -m 'chore: bump version to #{version}'"
sh "git tag v#{version}"
sh "git push origin master"
sh "git push origin v#{version}"
end