Sha256: 6b3c52ec7dc175e1f45aadf224465dc538675a0528e5e8883c29960157a0149e
Contents?: true
Size: 603 Bytes
Versions: 1
Compression:
Stored size: 603 Bytes
Contents
# encoding: utf-8 desc "Build the gem" task :build do sh "gem build pupu.gemspec" end namespace :build do desc "Build the prerelease gem" task :prerelease do gemspec = "pupu.gemspec" content = File.read(gemspec) prename = "#{gemspec.split(".").first}.pre.gemspec" # 0.1.1 => 0.2 version = Pupu::VERSION.sub(/^(\d+)\.(\d+).*$/) { "#$1.#{$2.to_i + 1}" } puts "Current #{Pupu::VERSION} => #{version} pre" File.open(prename, "w") do |file| file.puts(content.gsub(/(\w+::VERSION)/, "'#{version}.pre'")) end sh "gem build #{prename}" rm prename end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pupu-0.1.pre | tasks/gem.rake |