lib/ruby/builder/ruby_builder.rb in ruby-builder-0.1.0 vs lib/ruby/builder/ruby_builder.rb in ruby-builder-0.1.1
- old
+ new
@@ -14,9 +14,16 @@
def build(revision, source_dir:, build_dir:, install_dir:)
execute('git', 'checkout', revision.git, dir: source_dir)
unless File.executable?(File.join(source_dir, 'configure'))
execute('autoreconf', dir: source_dir)
end
+
+ # Workaround to force updating revision in RUBY_DESCRIPTION
+ timestamp_file = File.join(build_dir, '.revision.time')
+ if File.exist?(timestamp_file)
+ execute('rm', timestamp_file)
+ end
+
execute(File.join(source_dir, 'configure'), '--disable-install-doc', "--prefix=#{install_dir}", dir: build_dir)
execute('make', "-j#{Etc.nprocessors}", dir: build_dir)
execute('make', 'install', dir: build_dir)
end