Sha256: 6077743f8e59befdb78754d387dbd95c8245f6b60249f5c934d67e47c3bf013f

Contents?: true

Size: 1.81 KB

Versions: 16

Compression:

Stored size: 1.81 KB

Contents

require 'config/requirements'
require 'config/hoe' # setup Hoe + all gem configuration

Dir['tasks/**/*.rake'].each { |rake| load rake }

desc "Clean tmp directory"
task :clean_tmp do |t|
  %x[rm #{File.dirname(__FILE__)}/Manifest.txt; touch #{File.dirname(__FILE__)}/Manifest.txt]
  %w(logs tmp).each do |dir|
    FileUtils.rm_rf("#{File.dirname(__FILE__)}/#{dir}") if ::File.exists?("#{File.dirname(__FILE__)}/#{dir}")
  end
end
desc "Remove the pkg directory"
task :clean_pkg do |t|
  %w(pkg).each do |dir|
    FileUtils.rm_rf("#{File.dirname(__FILE__)}/#{dir}") if ::File.exists?("#{File.dirname(__FILE__)}/#{dir}")
  end
end

desc "Generate a new manifest and a new gem"
task :build_local_gem => [:clean_tmp, :clean_pkg, :"manifest:refresh", :package]

desc "Release to github"
task :github_release => [:clean_tmp, :clean_pkg, :"manifest:refresh", :package] do
  res = %x[rake debug_gem]
  res = res.split("\n")[1..-1].join("\n")
  ::File.open("#{GEM_NAME.downcase}.gemspec", "w+") do |f|
    f << res
  end
  `mv #{::File.expand_path(::File.dirname(__FILE__))}/pkg/*.gem #{::File.expand_path(::File.dirname(__FILE__))}/pkg/poolparty.gem`
end

desc "Generate gemspec"
task :gemspec  => [:clean_tmp, :"manifest:refresh", :build_local_gem] do |t|
  res = %x[rake debug_gem]
  res = res.split("\n")[1..-1].join("\n")
  ::File.open("#{GEM_NAME.downcase}.gemspec", "w+") do |f|
    f << res
  end
end

desc "Generate gemspec for github"
task :gh => [:github_release] do
  filepath = ::File.join(::File.dirname(__FILE__), "poolparty.gemspec")
  data = open(filepath).read
  spec = eval("$SAFE = 3\n#{data}")
  yml = YAML.dump spec
  File.open(filepath, "w+") do |f|
    f << yml
  end
end

desc "Generate github gemspec and latest gem"
task :ghgem => [:gh] do
  %x[sudo gem install pkg/poolparty.gem]
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
auser-dslify-0.0.3 Rakefile
auser-dslify-0.0.4 Rakefile
auser-dslify-0.0.5 Rakefile
auser-dslify-0.0.6 Rakefile
auser-dslify-0.0.7 Rakefile
auser-poolparty-1.1.1 vendor/gems/dslify/Rakefile
auser-poolparty-1.1.3 vendor/gems/dslify/Rakefile
auser-poolparty-1.1.4 vendor/gems/dslify/Rakefile
auser-poolparty-1.1.5 vendor/gems/dslify/Rakefile
auser-poolparty-1.1.7 vendor/gems/dslify/Rakefile
auser-poolparty-1.2.0 vendor/gems/dslify/Rakefile
auser-poolparty-1.2.1 vendor/gems/dslify/Rakefile
auser-poolparty-1.2.2 vendor/gems/dslify/Rakefile
fairchild-poolparty-1.1.3 vendor/gems/dslify/Rakefile
fairchild-poolparty-1.1.4 vendor/gems/dslify/Rakefile
poolparty-1.2.2 vendor/gems/dslify/Rakefile