Sha256: dee43c1ab7f00c67480e04ba1ffcfa8180053950f46c99d53fb2a994618dc25c

Contents?: true

Size: 1.38 KB

Versions: 13

Compression:

Stored size: 1.38 KB

Contents

# encoding: utf-8

require "nake/tasks/gem"

# require "nake/tasks/release"
# Task[:release].config[:version] = Nake::VERSION
task(:release, "release:tag", "release:gemcutter").tap do |task|
  task.description = "Release current version version"
  task.define do
    puts "Version #{task.config[:version]} was successfuly published. Don't forget to increase VERSION constant!"
  end
end

task(:prerelease).tap do |task|
  task.description = "Update prerelease version"
  task.define do
    Task[:release].config[:version] = "#{Task[:release].config[:version]}.pre"
    Task[:build].config[:gemspec] = Task[:build].config[:gemspec].sub(/\.gemspec/, ".pre.gemspec")
    Task["release:gemcutter"].call
  end
end

Task.new("release:tag") do |task|
  task.description = "Create Git tag"
  task.define do
    version = Task[:release].config[:version]
    raise ConfigurationError, "You have to provide Task[:release].config[:version]!" if version.nil?
    puts "Creating new git tag #{version} and pushing it online ..."
    sh "git tag -a -m 'Version #{version}' #{version}"
    sh "git push --tags"
    puts "Tag #{version} was created and pushed to GitHub."
  end
end

Task.new("release:gemcutter") do |task|
  task.description  = "Push gem to Gemcutter"
  task.dependencies = [:clean, :build]
  task.extend(PackageMixin)
  task.define do
    puts "Pushing to Gemcutter ..."
    sh "gem push #{self.gem_name}"
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
nake-0.1.1 lib/nake/tasks/release.rb
nake-0.1 lib/nake/tasks/release.rb
nake-0.0.9.5 lib/nake/tasks/release.rb
nake-0.0.9.4 lib/nake/tasks/release.rb
nake-0.0.9.3 lib/nake/tasks/release.rb
nake-0.0.9.2 lib/nake/tasks/release.rb
nake-0.0.9.pre lib/nake/tasks/release.rb
do_riak-0.10.1.pre gems/gems/nake-0.0.8/lib/nake/tasks/release.rb
nake-0.0.8.pre lib/nake/tasks/release.rb
nake-0.0.8 lib/nake/tasks/release.rb
nake-0.0.7 lib/nake/tasks/release.rb
nake-0.0.6 lib/nake/tasks/release.rb
nake-0.0.5 lib/nake/tasks/release.rb