Sha256: 3c33da0921f3a3ce2eed23a9defa971a46023a359df3845156fb7e010388e6da

Contents?: true

Size: 879 Bytes

Versions: 9

Compression:

Stored size: 879 Bytes

Contents

# frozen_string_literal: true

class RakeHelper
  GITHUB_PACKAGES_PUSH_COMMAND =
    "gem push --key github --host https://rubygems.pkg.github.com/milkeclair " \
    "pkg/jp_quest-#{JpQuest::VERSION}.gem".freeze

  RUBYGEMS_PUSH_COMMAND =
    "gem push --host https://rubygems.org " \
    "pkg/jp_quest-#{JpQuest::VERSION}.gem".freeze

  def self.init_rake_tasks
    RSpec::Core::RakeTask.new(:spec) { |task| task.verbose = false }
    RuboCop::RakeTask.new
    YARD::Rake::YardocTask.new
  end

  def self.build_gem
    abort("gemのビルドに失敗しました") unless system("rake build")
  end

  def self.push_to_github_packages
    abort("githubへのgemのpushに失敗しました") unless system(GITHUB_PACKAGES_PUSH_COMMAND)
  end

  def self.push_to_rubygems
    abort("rubygemsへのgemのpushに失敗しました") unless system(RUBYGEMS_PUSH_COMMAND)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
jp_quest-0.3.2 rake_helper.rb
jp_quest-0.3.1 rake_helper.rb
jp_quest-0.3.0 rake_helper.rb
jp_quest-0.2.1 rake_helper.rb
jp_quest-0.2.0 rake_helper.rb
jp_quest-0.1.3 rake_helper.rb
jp_quest-0.1.2 rake_helper.rb
jp_quest-0.1.1 rake_helper.rb
jp_quest-0.1.0 rake_helper.rb