Sha256: a7bc53c19979f9a1973e6b661379998c522124102718ad0f490bc04e59b6a453

Contents?: true

Size: 890 Bytes

Versions: 16

Compression:

Stored size: 890 Bytes

Contents

require "bundler/gem_tasks"
require "aruba"

# Cucumber tasks
$:.unshift(File.dirname(__FILE__) + '/../../lib')
require 'cucumber/rake/task'

Cucumber::Rake::Task.new

# extracted from https://github.com/grosser/project_template
rule /^version:bump:.*/ do |t|
  sh "git status | grep 'nothing to commit'" # ensure we are not dirty
  index = ['major', 'minor','patch'].index(t.name.split(':').last)
  file = 'lib/salesforcedeploytool/version.rb'

  version_file = File.read(file)
  old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
  version_parts[index] = version_parts[index].to_i + 1
  version_parts[2] = 0 if index < 2
  version_parts[1] = 0 if index < 1
  new_version = version_parts * '.'
  File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }

  sh "bundle && git add #{file} && git commit -m 'bump version to #{new_version}'"
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
salesforce-deploy-tool-3.3.4 Rakefile
salesforce-deploy-tool-3.3.3 Rakefile
salesforce-deploy-tool-3.3.2 Rakefile
salesforce-deploy-tool-3.3.1 Rakefile
salesforce-deploy-tool-3.2.0 Rakefile
salesforce-deploy-tool-3.1.0 Rakefile
salesforce-deploy-tool-2.1.1 Rakefile
salesforce-deploy-tool-2.1.0 Rakefile
salesforce-deploy-tool-2.0.0 Rakefile
salesforce-deploy-tool-1.3.0 Rakefile
salesforce-deploy-tool-1.2.0 Rakefile
salesforce-deploy-tool-1.1.0 Rakefile
salesforce-deploy-tool-1.0.3 Rakefile
salesforce-deploy-tool-1.0.2 Rakefile
salesforce-deploy-tool-1.0.1 Rakefile
salesforce-deploy-tool-1.0.0 Rakefile