rubygems need to have the files in the local dir before packaging

pull/534/head
Todd Fisher 2 years ago
parent 663444332c
commit a210f01215
No known key found for this signature in database
GPG Key ID: 15A1619895B1FB4A

@ -1,15 +1,18 @@
require 'erb' require 'erb'
require 'rubygems/package' require 'rubygems/package'
BUILD_VERSION=1
# Determine the current version of the software # Determine the current version of the software
if File.read('../../CMakeLists.txt') =~ /project.*\s*VERSION\s*(\d.+)\)/ if File.read('../../CMakeLists.txt') =~ /project.*\s*VERSION\s*(\d.+)\)/
CURRENT_VERSION = $1 CURRENT_VERSION = "#{$1}.#{BUILD_VERSION}"
else else
CURRENT_VERSION = "0.0.0" CURRENT_VERSION = "0.0.0.#{BUILD_VERSION}"
end end
desc 'Generate gem specification' desc 'Generate gem specification'
task :gemspec do task :gemspec do
system("cp ../../LICENSE .")
system("cp ../../README.md .")
tspec = ERB.new(File.read(File.join(File.dirname(__FILE__),'lib','whispercpp.gemspec.erb'))) tspec = ERB.new(File.read(File.join(File.dirname(__FILE__),'lib','whispercpp.gemspec.erb')))
File.open(File.join(File.dirname(__FILE__),'whispercpp.gemspec'),'wb') do|f| File.open(File.join(File.dirname(__FILE__),'whispercpp.gemspec'),'wb') do|f|
f << tspec.result f << tspec.result

@ -5,9 +5,9 @@ Gem::Specification.new do |s|
s.date = '<%= Time.now.strftime("%Y-%m-%d") %>' s.date = '<%= Time.now.strftime("%Y-%m-%d") %>'
s.description = %q{High-performance inference of OpenAI's Whisper automatic speech recognition (ASR) model via Ruby} s.description = %q{High-performance inference of OpenAI's Whisper automatic speech recognition (ASR) model via Ruby}
s.email = 'todd.fisher@gmail.com' s.email = 'todd.fisher@gmail.com'
s.extra_rdoc_files = ['../../LICENSE', '../../README.md'] s.extra_rdoc_files = ['LICENSE', 'README.md']
<% <%
files = %w(../../LICENSE ../../README.md Rakefile ext/extconf.rb) + files = %w(LICENSE README.md Rakefile ext/extconf.rb) +
Dir["lib/**/**.rb"] + Dir["lib/**/**.rb"] +
Dir["ext/**/**.c"] + Dir["ext/**/**.c"] +
Dir["ext/**/**.cpp"] + Dir["ext/**/**.cpp"] +

Loading…
Cancel
Save