Sha256: 0dd2fe51dd00518cab10530de152d089ee4500bfdd0edfdc82664cdfb563f0e5

Contents?: true

Size: 728 Bytes

Versions: 2

Compression:

Stored size: 728 Bytes

Contents

#!/usr/bin/env ruby

system("bin/update")

file = File.absolute_path("../../lib/trackler/version.rb", __FILE__)

contents = File.read(file)
major, minor, patch, data = contents[/\ \ VERSION\ =\ "(.*)"/, 1].split(".")

version = [major, minor, patch, data.to_i + 1].join(".")

template = <<-TEMPLATE % version
module Trackler
  VERSION = "%s"
end
TEMPLATE

File.open(file, "w") do |f|
  f.puts template
end

cmds = [
  "git add lib/trackler/version.rb",
  "git commit -m 'Bump to v%s'" % version,
  "git tag v%s" % version,
  "git push origin master",
  "git push --tags",
  "gem build trackler.gemspec",
  "gem install --local trackler-%s.gem" % version,
  "gem push trackler-%s.gem" % version,
].each do |cmd|
  system cmd
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trackler-1.0.1.2 bin/bump-content
trackler-1.0.1.1 bin/bump-content