Skip to content

Commit

Permalink
Another fix to the gem build [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeen committed Jan 9, 2023
1 parent 44d4c8f commit 0b5d91a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/tracking_number/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module TrackingNumber
VERSION = "1.3.1"
VERSION = "1.3.4"
end
4 changes: 3 additions & 1 deletion tracking_number.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ Gem::Specification.new do |s|

s.files = `git ls-files`.split("\n")

gem_dir = "#{File.expand_path(File.join(__FILE__, '..'))}/"
`git submodule --quiet foreach pwd`.split($OUTPUT_RECORD_SEPARATOR).each do |submodule_path|
Dir.chdir(submodule_path.chomp) do
submodule_relative_path = submodule_path.sub gem_dir, ''

# issue git ls-files in submodule's directory
submodule_files = `git ls-files -- couriers/*`.split($OUTPUT_RECORD_SEPARATOR)
Expand All @@ -32,7 +34,7 @@ Gem::Specification.new do |s|
# remove leading path parts to get paths relative to the gem's root dir
# (this assumes, that the gemspec resides in the gem's root dir)
submodule_files_paths = submodule_files_fullpaths.map do |filename|
filename.gsub "#{File.dirname(__FILE__)}/", ''
filename.gsub gem_dir, ''
end

# add relative paths to gem.files
Expand Down

0 comments on commit 0b5d91a

Please sign in to comment.