Sha256: 28b9cf8ca5d3484cd3ff8fdd58bb8dd8eadbe0d554d18f252f618d0946ba745b
Contents?: true
Size: 1.29 KB
Versions: 2
Compression:
Stored size: 1.29 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 desc "Check code style with Rubocop" task :rubocop do sh "rubocop" end desc "Generate documentation for Yard, and fail if there are any warnings" task :test_doc do sh "ruby bin/yard --fail-on-warning #{"--no-progress" if ENV["CI"]}" end task :default => [:rubocop, :spec, :test_doc] YARD::Rake::YardocTask.new do |t| t.options += ['--title', "YARD #{YARD::VERSION} Documentation"] end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yard-0.9.18 | Rakefile |
yard-0.9.17 | Rakefile |