Sha256: ed97a3df8186c89f461250e89f84ce949d4a08a6c6e7a2a9cfd340a6be972bb6

Contents?: true

Size: 1.67 KB

Versions: 14

Compression:

Stored size: 1.67 KB

Contents

release_ops_path = File.expand_path('../releaseops/lib', __FILE__)

# if the special submodule is availabe, use it
# we use a submodule because it doesn't depend on anything else (*cough* bundler)
# and can be shared across projects
#
if File.exists?(release_ops_path)
  require File.join(release_ops_path, 'releaseops')

  # sets up the multi-ruby zk:test_all rake tasks
  ReleaseOps::TestTasks.define_for(*%w[1.8.7 1.9.2 jruby ree 1.9.3])

  # sets up the task :default => 'spec:run' and defines a simple
  # "run the specs with the current rvm profile" task
  ReleaseOps::TestTasks.define_simple_default_for_travis

  # Define a task to run code coverage tests
  ReleaseOps::TestTasks.define_simplecov_tasks

  # set up yard:server, yard:gems, and yard:clean tasks 
  # for doing documentation stuff
  ReleaseOps::YardTasks.define

  namespace :zk do
    namespace :gems do
      task :build do
        require 'tmpdir'

        raise "You must specify a TAG" unless ENV['TAG']

        ReleaseOps.with_tmpdir(:prefix => 'zk') do |tmpdir|
          tag = ENV['TAG']

          sh "git clone . #{tmpdir}"

          orig_dir = Dir.getwd

          cd tmpdir do
            sh "git co #{tag} && git reset --hard && git clean -fdx"

            sh "rvm 1.8.7 do gem build zk.gemspec"

            mv FileList['*.gem'], orig_dir
          end
        end
      end

      task :push do
        gems = FileList['*.gem']
        raise "No gemfiles to push!" if gems.empty?

        gems.each do |gem|
          sh "gem push #{gem}"
        end
      end

      task :clean do
        rm_rf FileList['*.gem']
      end

      task :all => [:build, :push, :clean]
    end
  end


  task :clean => 'yard:clean'
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
zk-1.7.3 Rakefile
zk-1.7.2 Rakefile
zk-1.7.1 Rakefile
zk-1.7.0 Rakefile
zk-1.6.5 Rakefile
zk-1.6.4 Rakefile
zk-1.6.3 Rakefile
zk-1.6.2 Rakefile
zk-1.6.1 Rakefile
zk-1.6.0 Rakefile
zk-1.5.3 Rakefile
zk-1.5.2 Rakefile
zk-1.5.1 Rakefile
zk-1.5.0 Rakefile