Sha256: ce29d80e7da56f31321b7ca0117741efef5eec57e5fc13943629a9bae865d2ca
Contents?: true
Size: 1.36 KB
Versions: 11
Compression:
Stored size: 1.36 KB
Contents
require File.expand_path(File.dirname(__FILE__) + "/../bonethug") namespace :thug do def update_version_file(content = nil) unless content # generate content for version file content = ' module Bonethug VERSION = "' + Bonethug::VERSION + '" BUILD_DATE = "' + Time.now.to_s + '" end ' end # handle paths ver_path = File.expand_path File.dirname(__FILE__) + '/../bonethug/version.rb' # write data File.open(ver_path,'w') do |file| file.puts content end end desc "Increments version" task :vup do puts "was " + Bonethug::VERSION Bonethug::increment_version update_version_file puts "now " + Bonethug::VERSION end desc "Runs rake build + some other stuff" task :build do # update version file update_version_file # invoke the build script system 'git commit -am "commit to build for v ' + Bonethug::VERSION + '" && rake build' end desc "Runs rake release + bonethug:build" task :release do # handle path path = File.expand_path File.dirname(__FILE__) + '/../../pkg/bonethug-' + Bonethug::VERSION + '.gem' # check if there's a build with the current version Rake::Task["thug:build"].invoke # do the bidniz system 'rake release --trace' end end
Version data entries
11 entries across 11 versions & 1 rubygems