Sha256: dfdd3f11bd093f5eef6213afb712a126450019488525054c3b2e14741d4cf8c1

Contents?: true

Size: 1.36 KB

Versions: 22

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

22 entries across 22 versions & 1 rubygems

Version Path
bonethug-0.0.87 lib/tasks/bonethug.rake
bonethug-0.0.86 lib/tasks/bonethug.rake
bonethug-0.0.85 lib/tasks/bonethug.rake
bonethug-0.0.84 lib/tasks/bonethug.rake
bonethug-0.0.83 lib/tasks/bonethug.rake
bonethug-0.0.82 lib/tasks/bonethug.rake
bonethug-0.0.81 lib/tasks/bonethug.rake
bonethug-0.0.80 lib/tasks/bonethug.rake
bonethug-0.0.79 lib/tasks/bonethug.rake
bonethug-0.0.78 lib/tasks/bonethug.rake
bonethug-0.0.77 lib/tasks/bonethug.rake
bonethug-0.0.76 lib/tasks/bonethug.rake
bonethug-0.0.75 lib/tasks/bonethug.rake
bonethug-0.0.73 lib/tasks/bonethug.rake
bonethug-0.0.72 lib/tasks/bonethug.rake
bonethug-0.0.71 lib/tasks/bonethug.rake
bonethug-0.0.70 lib/tasks/bonethug.rake
bonethug-0.0.69 lib/tasks/bonethug.rake
bonethug-0.0.68 lib/tasks/bonethug.rake
bonethug-0.0.67 lib/tasks/bonethug.rake