Skip to content

Commit

Permalink
build: reduce tarball size by 8-10%
Browse files Browse the repository at this point in the history
Slim the tarballs further by removing examples, documentation and test for
third party libraries. Also switch to checkout-index versus archive so we avoid
using tar.

PR-URL: #961
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
  • Loading branch information
jbergstroem authored and rvagg committed Feb 28, 2015
1 parent 84ee272 commit b8310cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,14 @@ $(PKG): release-only
SIGN="$(INT_SIGN)" PKG="$(PKG)" bash tools/osx-productsign.sh

$(TARBALL): release-only $(NODE_EXE) doc
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
git checkout-index -a -f --prefix=$(TARNAME)/
mkdir -p $(TARNAME)/doc/api
cp doc/iojs.1 $(TARNAME)/doc/iojs.1
cp -r out/doc/api/* $(TARNAME)/doc/api/
rm -rf $(TARNAME)/deps/v8/test # too big
rm -rf $(TARNAME)/deps/v8/{test,samples,tools/profviz} # too big
rm -rf $(TARNAME)/doc/images # too big
rm -rf $(TARNAME)/deps/uv/{docs,samples,test}
rm -rf $(TARNAME)/deps/openssl/{doc,demos,test}
rm -rf $(TARNAME)/deps/zlib/contrib # too big, unused
find $(TARNAME)/ -type l | xargs rm # annoying on windows
tar -cf $(TARNAME).tar $(TARNAME)
Expand Down

0 comments on commit b8310cb

Please sign in to comment.