Sha256: 368b8030ffe5233c08937b5addfd04931c1b8ea79741ace1197af7da37918c2d

Contents?: true

Size: 780 Bytes

Versions: 34

Compression:

Stored size: 780 Bytes

Contents

PLUGIN_NAME = Dir['*.gemspec'][0].split('.')[0..-2].join('.')

task :require_version do
  unless ENV['VERSION']
    puts "VERSION is required: rake build VERSION=X.Y.Z"
    exit 1
  end
end

task :build => [:require_version] do
  _, platform, *_ = RUBY_PLATFORM.split("-")
  if platform == 'mswin32' or platform == 'mingw32'
    puts "Warning: Building gem on Windows will lose file permissions"
  end
  # Build the widget and gem using sh built into Rake:
  # https://rubydoc.info/gems/rake/FileUtils#sh-instance_method
  sh('yarn', 'run', 'build')
  sh('gem', 'build', PLUGIN_NAME)
  sh('openc3cli validate *.gem') do |ok, status|
    if !ok && status.exitstatus == 127 # command not found
      puts "Install the openc3 gem to validate! (gem install openc3)"
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
openc3-6.2.1 templates/widget/Rakefile
openc3-6.2.0 templates/widget/Rakefile
openc3-6.1.0 templates/widget/Rakefile
openc3-6.0.2 templates/widget/Rakefile
openc3-6.0.1 templates/widget/Rakefile
openc3-6.0.0 templates/widget/Rakefile
openc3-5.20.0 templates/widget/Rakefile
openc3-5.19.0 templates/widget/Rakefile
openc3-5.18.0 templates/widget/Rakefile
openc3-5.17.1 templates/widget/Rakefile
openc3-5.17.0 templates/widget/Rakefile
openc3-5.16.0 templates/widget/Rakefile
openc3-5.15.2 templates/widget/Rakefile
openc3-5.15.1 templates/widget/Rakefile
openc3-5.15.0 templates/widget/Rakefile
openc3-5.14.2 templates/widget/Rakefile
openc3-5.14.1 templates/widget/Rakefile
openc3-5.14.0 templates/widget/Rakefile
openc3-5.13.0 templates/widget/Rakefile
openc3-5.12.0 templates/widget/Rakefile