Sha256: 6ab8ebc8ffef74bd13217ee39d9b2d78196c9992cb81bf6c65444eba568ed349
Contents?: true
Size: 1.75 KB
Versions: 1
Compression:
Stored size: 1.75 KB
Contents
############################################################################# # # Helper functions # ############################################################################# def name @name ||= Dir['*.gemspec'].first.split('.').first end def gemspec_file "#{name}.gemspec" end def gemspec @gemspec ||= eval(IO.read(gemspec_file)) end def gem_file gemspec.file_name end ############################################################################# # # Standard tasks # ############################################################################# desc "Deploys the builded gem to the soundcloud gem repository: gems.soundcloud.com" task :release => :build do remote_gem_host = 'soundcloud@gems.int.s-cloud.net' remote_gem_path = '/srv/www/gems' Dir.chdir File.dirname(__FILE__) unless `git branch` =~ /^\* master$/ puts "You must be on the master branch to release!" exit! end if `git fetch --tags && git tag`.split(/\n/).include?(gem_file) raise "Version #{gem_file} already deployed" end sh <<-END git commit -a --allow-empty -m 'Release #{gem_file}' git tag -a #{gem_file} -m 'Version #{gem_file}' git push origin master git push origin --tags scp pkg/#{gem_file} #{remote_gem_host}:#{remote_gem_path}/gems && \ ssh #{remote_gem_host} 'gem generate_index -d #{remote_gem_path}' END end require 'bundler/gem_tasks' require 'rdoc/task' RDoc::Task.new do |rd| rd.main = "README.rdoc" rd.title = 'big_sitemap' rd.options << '--line-numbers' << '--inline-source' rd.rdoc_files.include("README.rdoc", "lib/**/*.rb") end require 'rake/testtask' Rake::TestTask.new(:test) do |t| t.libs << 'lib' << 'test' << Rake.original_dir t.pattern = 'test/**/*_test.rb' t.verbose = false end task :default => :test
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sc-big_sitemap-0.8.3.4 | Rakefile |