Makefile: release: use git archive
authorPeter Korsgaard <jacmet@sunsite.dk>
Tue, 9 Feb 2010 15:34:04 +0000 (16:34 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 9 Feb 2010 15:34:04 +0000 (16:34 +0100)
Create tarballs with git-archive so we're sure they don't contain
anything not in git (E.G. local backup configs).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Makefile

index 177701ef43239d443d641b1da1aab033894dd509..a0c18ba7c1caae2737a4655fee9cf9b02d17d18f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -634,11 +634,9 @@ help:
        @echo 'See docs/README and docs/buildroot.html for further details'
        @echo
 
-release: distclean
+release:
        OUT=buildroot-$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \
-       rm -rf ../$$OUT*; cp -al . ../$$OUT; cd ..; \
-       tar cfz $$OUT.tar.gz --exclude .svn --exclude .git --exclude \*~ $$OUT; \
-       rm -rf $$OUT
+       git archive --format=tar --prefix=$$OUT/ master|gzip -9 >$$OUT.tar.gz
 
 .PHONY: $(noconfig_targets)