From bde50e313d784f9832314d0e40c5579ecbe3da66 Mon Sep 17 00:00:00 2001 From: Kirill Leonov Date: Wed, 15 May 2024 13:36:52 +0300 Subject: [PATCH] done --- Rakefile | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 970b1e9..f4e6ce8 100644 --- a/Rakefile +++ b/Rakefile @@ -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