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