Skip to content

Commit

Permalink
Fixes #23825 - Add exporting to Rakefile.dist
Browse files Browse the repository at this point in the history
The benefit is that you no longer need the full bundle stack installed.
We also output the generated filename for use in scripts.
  • Loading branch information
ekohl authored and ehelms committed Jun 19, 2018
1 parent 22016fd commit 3a31019
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Rakefile.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'rake/clean'
load File.join(__dir__, 'lib', 'tasks', 'pkg.rake')

BUILDDIR = File.expand_path(ENV['BUILDDIR'] || '_build')
PREFIX = ENV['PREFIX'] || '/usr/local'
Expand Down
4 changes: 3 additions & 1 deletion lib/tasks/pkg.rake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ namespace :pkg do
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

0 comments on commit 3a31019

Please sign in to comment.