Skip to content

Commit

Permalink
fix up packaging after moving tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Jan 29, 2012
1 parent 9652c28 commit 6b5ed49
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tasks/dist.rake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ end
GEM_BLACKLIST = %w( bundler foreman )

def assemble_gems(target_dir=Dir.pwd)
lines = %x{ bundle show }.strip.split("\n")
lines = %x{ cd #{project_root} && bundle show }.strip.split("\n")
raise "error running bundler" unless $?.success?

%x{ env BUNDLE_WITHOUT="development:test" bundle show }.split("\n").each do |line|
Expand All @@ -47,8 +47,7 @@ def distribution_files(type=nil)
require "foreman/distribution"
base_files = Foreman::Distribution.files
type_files = type ?
Dir[File.expand_path("../dist/resources/#{type}/**/*", __FILE__)] :
[]
Dir[File.expand_path("../../dist/resources/#{type}/**/*", __FILE__)] : []
base_files.concat(type_files)
end

Expand All @@ -60,15 +59,15 @@ def mkchdir(dir)
end

def pkg(filename)
File.expand_path("../pkg/#{filename}", __FILE__)
File.expand_path("../../pkg/#{filename}", __FILE__)
end

def project_root
File.dirname(__FILE__)
File.expand_path("../..", __FILE__)
end

def resource(name)
File.expand_path("../dist/resources/#{name}", __FILE__)
File.expand_path("../../dist/resources/#{name}", __FILE__)
end

def s3_connect
Expand Down

0 comments on commit 6b5ed49

Please sign in to comment.