Skip to content

Commit

Permalink
Merge pull request #1965 from florindragos/git_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gheorghe Popescu authored Jul 13, 2020
2 parents fadc737 + f650c67 commit 84bfaf8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 30 deletions.
19 changes: 5 additions & 14 deletions agent/facter-ng.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,13 @@ Gem::Specification.new do |spec|
spec.summary = 'New version of Facter'
spec.description = 'New version of Facter'

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = if system('git --help &> /dev/null')
`git ls-files -z`.split("\x0")
else
Dir.glob('**/*')
end
spec.files = Dir['bin/facter-ng'] +
Dir['lib/**/*.rb'] +
Dir['lib/**/*.json'] +
Dir['lib/**/*.conf'] +
Dir['agent/**/*']

spec.required_ruby_version = '~> 2.3'
spec.files.reject! do |f|
f.match(%r{^(test|spec|features|acceptance)/})
end

spec.files.reject! do |f|
f == 'bin/facter'
end

spec.bindir = 'bin'
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
Expand Down
20 changes: 4 additions & 16 deletions facter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,12 @@ Gem::Specification.new do |spec|
spec.summary = 'New version of Facter'
spec.description = 'New version of Facter'

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
# On our internal Jenkins, there is no git. As it is a clean machine, we don't need to worry about anything else.
spec.files = if system('git --help &> /dev/null')
`git ls-files -z`.split("\x0")
else
Dir.glob('**/*')
end
spec.files = Dir['bin/facter'] +
Dir['lib/**/*.rb'] +
Dir['lib/**/*.json'] +
Dir['lib/**/*.conf']

spec.required_ruby_version = '~> 2.3'
spec.files.reject! do |f|
f.match(%r{^(test|spec|features|acceptance)/})
end

spec.files.reject! do |f|
f == 'bin/facter-ng'
end

spec.bindir = 'bin'
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
Expand Down

0 comments on commit 84bfaf8

Please sign in to comment.