Project

General

Profile

« Previous | Next » 

Revision fbd693d4

Added by Ewoud Kohl van Wijngaarden almost 6 years ago

Fixes #24016 - Allow building a tarball without bundle

This allows generation of the source tarball without the whole bundle
installed. It also prints the generated filename.

View differences:

Rakefile.dist
require 'rake/clean'
load 'tasks/pkg.rake'
BUILDDIR = File.expand_path(ENV['BUILDDIR'] || '_build')
PREFIX = ENV['PREFIX'] || '/usr/local'
tasks/pkg.rake
task :generate_source do
File.exist?('pkg') || FileUtils.mkdir('pkg')
ref = ENV['ref'] || 'HEAD'
name = 'foreman-proxy'
version = `git show #{ref}:VERSION`.chomp.chomp('-develop')
raise "can't find VERSION from #{ref}" if version.empty?
`git archive --prefix=foreman-proxy-#{version}/ #{ref} | bzip2 -9 > pkg/foreman-proxy-#{version}.tar.bz2`
filename = "pkg/#{name}-#{version}.tar.bz2"
`git archive --prefix=#{name}-#{version}/ #{ref} | bzip2 -9 > #{filename}`
raise 'Failed to generate the source archive' if $? != 0
puts filename
end
end

Also available in: Unified diff