Project

General

Profile

« Previous | Next » 

Revision 3a31019a

Added by Ewoud Kohl van Wijngaarden almost 6 years ago

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.

View differences:

Rakefile.dist
require 'rake/clean'
load File.join(__dir__, 'lib', 'tasks', 'pkg.rake')
BUILDDIR = File.expand_path(ENV['BUILDDIR'] || '_build')
PREFIX = ENV['PREFIX'] || '/usr/local'
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