Sha256: a6748a022bab50117c84bf99142ba53ea9d0aa445b35aa1065ff491e099bf12f

Contents?: true

Size: 1.03 KB

Versions: 15

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true
require File.dirname(__FILE__) + '/lib/yard'
require File.dirname(__FILE__) + '/lib/yard/rubygems/specification'
require 'rbconfig'

YARD::VERSION.replace(ENV['YARD_VERSION']) if ENV['YARD_VERSION']

desc "Publish gem"
task :publish do
  ver = ENV['VERSION']

  raise "missing VERSION=x.y.z" if ver.nil? || ver.empty?
  if ver < YARD::VERSION
    raise "invalid version `#{ver}' (must be >= `#{YARD::VERSION}')"
  end

  file = "release-v#{ver}.tar.gz"
  cmd = "bundle exec samus"
  sh "#{cmd} build #{ver} && #{cmd} publish #{file} && rm #{file}"
end

desc "Builds the gem"
task :gem do
  sh "gem build yard.gemspec"
end

desc "Installs the gem"
task :install => :gem do
  sh "gem install yard-#{YARD::VERSION}.gem --no-document"
end

begin
  require 'rspec/core/rake_task'
  RSpec::Core::RakeTask.new(:spec)
rescue LoadError
  nil # noop
end

task :rubocop do
  sh "rubocop"
end

task :default => [:rubocop, :spec]

YARD::Rake::YardocTask.new do |t|
  t.options += ['--title', "YARD #{YARD::VERSION} Documentation"]
end

Version data entries

15 entries across 14 versions & 4 rubygems

Version Path
yard-0.9.16 Rakefile
yard-0.9.15 Rakefile
yard-0.9.14 Rakefile
yard-0.9.13 Rakefile
yard-0.9.12 Rakefile
yard-0.9.11 Rakefile
yard-0.9.10 Rakefile
yard-0.9.9 Rakefile
etude_for_ruby-0.1.4 vendor/bundle/ruby/2.4.0/gems/yard-0.9.8/Rakefile
etude_for_ruby-0.1.4 vendor/bundle/ruby/2.2.0/gems/yard-0.9.8/Rakefile
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/yard-0.9.8/Rakefile
yard-0.9.8 Rakefile
abaci-0.3.0 vendor/bundle/gems/yard-0.9.7/Rakefile
yard-0.9.7 Rakefile
yard-0.9.6 Rakefile