lib/reap/project/package.rb in reap-9.3.1 vs lib/reap/project/package.rb in reap-9.3.3
- old
+ new
@@ -23,21 +23,26 @@
#
# TODO: When we add support for binary packages distclean
# should not be done for them.
def prepare(options)
- clean
- make_distclean if compiles?
- stamp(options)
+ @prepared ||= (
+ clean
+ make_distclean if compiles?
+ stamp(options)
+ true
+ )
end
# General pack command.
def package(options=nil)
packopts = configure_options(options, 'package')
formats = packopts['formats'] || ['zip']
formats = [formats].flatten
+
+ prepare(options)
puts unless dryrun?
formats.each do |format|
send("package_#{format}", options)
puts unless dryrun?