Rakefile in asana-0.10.3 vs Rakefile in asana-0.10.12

- old
+ new

@@ -27,10 +27,15 @@ .map { |n| Integer(n) } end # rubocop:disable Metrics/MethodLength def write_version(major, minor, patch) + + File.open('VERSION', 'w') do |f| + f.write "#{major}.#{minor}.#{patch}" + end + str = <<-EOS #:nodoc: module Asana # Public: Version of the gem. VERSION = '#{major}.#{minor}.#{patch}' @@ -39,14 +44,17 @@ File.open('./lib/asana/version.rb', 'w') do |f| f.write str end new_version = "#{major}.#{minor}.#{patch}" + system('bundle lock --update') + system('git add Gemfile.lock') + system('git add VERSION') system('git add lib/asana/version.rb') system(%(git commit -m "Bumped to #{new_version}" && ) + %(git tag -a v#{new_version} -m "Version #{new_version}")) - puts "\nRun git push --tags to release." + puts "\nRun git push --tags origin master:master to release." end desc 'Bumps a patch version' task :patch do major, minor, patch = read_version @@ -70,19 +78,7 @@ task default: [:all, :rubocop, :yard] desc 'Test the plugin under all supported Rails versions.' task :all do |_t| - if ENV['TRAVIS'] - # require 'json' - # puts JSON.pretty_generate(ENV.to_hash) - if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/ - appraisal_name = ENV['BUNDLE_GEMFILE'].scan(/faraday\_(.*)\.gemfile/).flatten.first - command_prefix = "appraisal faraday-#{appraisal_name}" - exec("#{command_prefix} bundle install && #{command_prefix} bundle exec rspec") - else - exec(' bundle exec appraisal install && bundle exec rake appraisal spec') - end - else - exec('bundle exec appraisal install && bundle exec rake appraisal spec') - end + exec('bundle exec appraisal install && bundle exec rake appraisal spec') end