Sha256: ac96c4dc0d3faa6ddc9ab4d2d7b1c8eab7af3197d9b6a3ebfb66fb181463c3aa

Contents?: true

Size: 1.18 KB

Versions: 2

Compression:

Stored size: 1.18 KB

Contents

# -*- coding: utf-8 -*-

task :build do
  ENV['GEM_PLATFORM'] = 'linux'
  Rake::Task['gem:build'].invoke

  ENV['GEM_PLATFORM'] = 'x86-mingw32'
  Rake::Task['gem:build'].reenable
  Rake::Task['assets:clobber'].reenable
  Rake::Task['assets:precompile:standalone'].reenable
  Rake::Task['gem:build'].invoke
end

task :release do
  ENV['GEM_PLATFORM'] = 'linux'
  Rake::Task['gem:release'].invoke

  ENV['GEM_PLATFORM'] = 'x86-mingw32'
  Rake::Task['gem:release'].reenable
  Rake::Task['gem:build'].reenable
  Rake::Task['assets:clobber'].reenable
  Rake::Task['assets:precompile:standalone'].reenable
  Rake::Task['gem:release'].invoke

  sh 'git mirror'
  sh 'relish push smalruby/smalruby-editor'

  require 'lib/smalruby_editor/version'
  next_version = SmalrubyEditor::VERSION.split('.').tap { |versions|
    versions[-1] = (versions[-1].to_i + 1).to_s
  }.join('.')
  File.open('lib/smalruby_editor/version.rb', 'w+') do |f|
    lines = []
    while line = f.gets
      line = "#{$1} '#{next_version}'\n" if /(\s*VERSION = )/.match(line)
      lines << line
    end
    f.rewind
    f.write(lines.join("\n"))
  end
  sh "git commit -m 'バージョンを#{next_version}に更新'"
  sh 'git push'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smalruby-editor-0.1.0-x86-mingw32 lib/tasks/release.rake
smalruby-editor-0.1.0 lib/tasks/release.rake