Skip to content

Commit

Permalink
Remove github and git related files from extracted bundled gems
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Mar 31, 2022
1 parent c499a4c commit abfd859
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common.mk
Expand Up @@ -1358,12 +1358,13 @@ update-gems$(gnumake:yes=-nongnumake): PHONY
extract-gems$(gnumake:yes=-nongnumake): PHONY
$(ECHO) Extracting bundled gem files...
$(Q) $(RUNRUBY) -C "$(srcdir)" \
-Itool -rgem-unpack -answ \
-Itool -rfileutils -rgem-unpack -answ \
-e 'BEGIN {FileUtils.mkdir_p(d = ".bundle/gems")}' \
-e 'gem, ver = *$$F' \
-e 'next if !ver or /^#/=~gem' \
-e 'g = "#{gem}-#{ver}"' \
-e 'File.directory?("#{d}/#{g}") or Gem.unpack("gems/#{g}.gem", d)' \
-e 'FileUtils.rm_rf("#{d}/#{g}/.github")' \
gems/bundled_gems

update-bundled_gems: PHONY
Expand Down
1 change: 1 addition & 0 deletions defs/gmake.mk
Expand Up @@ -296,6 +296,7 @@ extract-gems: | $(patsubst %,.bundle/gems/%,$(bundled-gems))
$(Q) $(BASERUBY) -C "$(srcdir)" \
-Itool -rgem-unpack \
-e 'Gem.unpack("gems/$(@F).gem", ".bundle/gems")'
$(RMALL) "$(srcdir)/$(@:.gem=)/".git*

$(srcdir)/.bundle/gems:
$(MAKEDIRS) $@
Expand Down

0 comments on commit abfd859

Please sign in to comment.