Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
leonovk committed May 15, 2024
1 parent e3e99c2 commit bde50e3
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
# frozen_string_literal: true

desc 'bump'
desc 'bump pathc version'
task :bump do
puts 'bump'
version = File.read('VERSION').gsub('v', '')
semver = version.split('.')
new_pathc = semver.last.to_i + 1
semver[2] = new_pathc.to_s
new_version = "v#{semver.join('.')}"
File.write('VERSION', new_version)
end

desc 'bump minor vesrion'
task :bump_minor do
version = File.read('VERSION').gsub('v', '')
semver = version.split('.')
new_pathc = semver[1].to_i + 1
semver[1] = new_pathc.to_s
semver[2] = '0'
new_version = "v#{semver.join('.')}"
File.write('VERSION', new_version)
end

desc 'rubocop and rspec check'
task :check do
system 'rspec'
system 'rubocop'
end

0 comments on commit bde50e3

Please sign in to comment.