Revision 3a31019a
Added by Ewoud Kohl van Wijngaarden almost 6 years ago
lib/tasks/pkg.rake | ||
---|---|---|
File.exist?('pkg') || FileUtils.mkdir('pkg')
|
||
ref = ENV['ref'] || 'HEAD'
|
||
version = `git show #{ref}:VERSION`.chomp.chomp('-develop')
|
||
filename = "pkg/foreman-#{version}.tar.bz2"
|
||
raise "can't find VERSION from #{ref}" if version.empty?
|
||
`git archive --prefix=foreman-#{version}/ #{ref} | bzip2 -9 > pkg/foreman-#{version}.tar.bz2`
|
||
`git archive --prefix=foreman-#{version}/ #{ref} | bzip2 -9 > #{filename}`
|
||
puts filename
|
||
end
|
||
end
|
Also available in: Unified diff
Fixes #23825 - Add exporting to Rakefile.dist
The benefit is that you no longer need the full bundle stack installed.
We also output the generated filename for use in scripts.