Sha256: b5b4b68256a8ddd76b06ebcd660ea25f8ab4c37c30d7fe6e25a44f7a7493ec71

Contents?: true

Size: 751 Bytes

Versions: 41

Compression:

Stored size: 751 Bytes

Contents

require "bundler/gem_tasks"

# 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

41 entries across 41 versions & 1 rubygems

Version Path
salesforce-deploy-tool-0.12.1 Rakefile
salesforce-deploy-tool-0.12.0 Rakefile
salesforce-deploy-tool-0.11.0 Rakefile
salesforce-deploy-tool-0.10.3 Rakefile
salesforce-deploy-tool-0.10.1 Rakefile
salesforce-deploy-tool-0.9.10 Rakefile
salesforce-deploy-tool-0.9.9 Rakefile
salesforce-deploy-tool-0.9.8 Rakefile
salesforce-deploy-tool-0.9.7 Rakefile
salesforce-deploy-tool-0.9.6 Rakefile
salesforce-deploy-tool-0.9.5 Rakefile
salesforce-deploy-tool-0.9.4 Rakefile
salesforce-deploy-tool-0.9.3 Rakefile
salesforce-deploy-tool-0.9.2 Rakefile
salesforce-deploy-tool-0.9.1 Rakefile
salesforce-deploy-tool-0.9.0 Rakefile
salesforce-deploy-tool-0.8.2 Rakefile
salesforce-deploy-tool-0.8.1 Rakefile
salesforce-deploy-tool-0.8.0 Rakefile
salesforce-deploy-tool-0.7.3 Rakefile