[dev] [PATCH] Use git to create dist archives.

From: Alex Pilon <alp_AT_alexpilon.ca>
Date: Mon, 16 Mar 2015 16:51:44 -0400

It's easy to forget things, like fixed with the following out of tree
patch.

    commit ec6937b989a171e872c58bc60f8b21bd25880cd5
    Author: M Farkas-Dyck <strake888_AT_gmail.com>
    Date: Wed Dec 10 14:29:34 2014 -0500

        dist arg.h; needed to build

    diff --git a/Makefile b/Makefile
    index 52af636..25719f1 100644
    --- a/Makefile
    +++ b/Makefile
    _AT_@ -34,7 +34,7 @@ clean:
     dist: clean
            _AT_echo creating dist tarball
            _AT_mkdir -p st-${VERSION}
    - _AT_cp -R LICENSE Makefile README config.mk config.def.h st.info st.1 ${SRC} st-${VERSION}
    + _AT_cp -R LICENSE Makefile README config.mk config.def.h st.info st.1 ${SRC} arg.h st-${VERSION}
            _AT_tar -cf st-${VERSION}.tar st-${VERSION}
            _AT_gzip st-${VERSION}.tar
            _AT_rm -rf st-${VERSION}

Less code, and people notice when things aren't in the repo unlike a
little used target.
---
 Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 4d6a8a9..01e50ef 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -33,11 +33,7 @@ clean:
 
 dist: clean
 	_AT_echo creating dist tarball
-	_AT_mkdir -p st-${VERSION}
-	_AT_cp -R LICENSE Makefile README config.mk config.def.h st.info st.1 ${SRC} st-${VERSION}
-	_AT_tar -cf st-${VERSION}.tar st-${VERSION}
-	_AT_gzip st-${VERSION}.tar
-	_AT_rm -rf st-${VERSION}
+	_AT_git archive --prefix=st-${VERSION}/ HEAD | gzip -c > st-${VERSION}.tar.gz
 
 install: all
 	_AT_echo installing executable file to ${DESTDIR}${PREFIX}/bin
-- 
2.3.3
Received on Mon Mar 16 2015 - 21:51:44 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 16 2015 - 22:00:11 CET