Skip to content

Commit

Permalink
Gems not getting any files (oops)
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Jan 10, 2011
1 parent 3cfaf47 commit b1e78b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Rakefile
Expand Up @@ -26,11 +26,13 @@ end
desc "Build gem(s)"
task :gem do
old_gemset = ENV['GEMSET']
pkg = "#{File.dirname(__FILE__)}/pkg"
root = File.expand_path('../', __FILE__)
pkg = "#{root}/pkg"
system "rm -Rf #{pkg}"
GemTemplate::Gems.gemset_names.each do |gemset|
ENV['GEMSET'] = gemset.to_s
system "mkdir -p #{pkg} && cd #{pkg} && gem build ../gem_template.gemspec"
system "cd #{root} && gem build gem_template.gemspec"
system "mkdir -p #{pkg} && mv *.gem pkg"
end
ENV['GEMSET'] = old_gemset
end
Expand Down
6 changes: 3 additions & 3 deletions gem_template.gemspec
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
root = File.dirname(__FILE__)
root = File.expand_path('../', __FILE__)
lib = "#{root}/lib"
$:.unshift lib unless $:.include?(lib)

Expand All @@ -26,7 +26,7 @@ Gem::Specification.new do |s|
end

s.executables = `cd #{root} && git ls-files -- {bin}/*`.split("\n").collect { |f| File.basename(f) }
s.files = `cd #{root} && git ls-files`.split("\n").collect { |f| "#{root}/#{f}" }
s.files = `cd #{root} && git ls-files`.split("\n")
s.require_paths = %w(lib)
s.test_files = `cd #{root} && git ls-files -- {features,test,spec}/*`.split("\n").collect { |f| "#{root}/#{f}" }
s.test_files = `cd #{root} && git ls-files -- {features,test,spec}/*`.split("\n")
end

0 comments on commit b1e78b3

Please sign in to comment.