[commit: libffi-tarballs] master: Use make dist to generate snapshot (7922be9)
git at git.haskell.org
git at git.haskell.org
Fri Oct 20 02:43:56 UTC 2017
Repository : ssh://git@git.haskell.org/libffi-tarballs
On branch : master
Link : http://git.haskell.org/libffi-tarballs.git/commitdiff/7922be9302b92152c06a4fddb32431b5e7829590
>---------------------------------------------------------------
commit 7922be9302b92152c06a4fddb32431b5e7829590
Author: Ben Gamari <ben at smart-cactus.org>
Date: Mon Oct 2 09:36:20 2017 -0400
Use make dist to generate snapshot
>---------------------------------------------------------------
7922be9302b92152c06a4fddb32431b5e7829590
mk-snapshot.sh | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/mk-snapshot.sh b/mk-snapshot.sh
index 942abdc..40d2a85 100755
--- a/mk-snapshot.sh
+++ b/mk-snapshot.sh
@@ -18,20 +18,18 @@ REPO="${TMPD}/libffi"
GHASH=$(git -C ${REPO} rev-parse --short HEAD)
GDATE=$(git -C ${REPO} log -1 --pretty=format:%cd --date=format:%Y%m%d)
SUFFIX="${GVERS}+git${GDATE}+${GHASH}"
-git -C ${REPO} archive --format=tar --prefix="libffi-${SUFFIX}/" HEAD | tar -C ${TMPD} -x
-# run and remove autogen, so we don't have to run it on the CI or elsewhere
-# and as such incure additional dependencies like libtool.
-(cd "${TMPD}/libffi-${SUFFIX}" && ./autogen.sh && rm autogen.sh)
+# run autogen and generate distribution tarball.
+(cd "$REPO" && ./autogen.sh && ./configure && make dist)
# package it up
-LIB="libffi-${SUFFIX}.tar.gz"
-(cd "${TMPD}" && tar -czf "${LIB}" "libffi-${SUFFIX}")
-mv "$TMPD/$LIB" ./$LIB
+DISTLIB="libffi-${GVERS}.tar.gz"
+FINALLIB="libffi-${SUFFIX}.tar.gz"
+mv "$REPO/$DISTLIB" ./$FINALLIB
-# create orphan branch
+# create orphan libffi-tarballs branch
git checkout --orphan "libffi-${SUFFIX}"
-git add $LIB
+git add $FINALLIB
cat >README.md <<EOF
# libffi snapshot tarball for GHC
More information about the ghc-commits
mailing list