]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: Refactor release scripts to conform to using git archive
authorAndrew Dahl <adahl@sgi.com>
Mon, 14 Jan 2013 18:16:02 +0000 (12:16 -0600)
committerBen Myers <bpm@sgi.com>
Fri, 1 Feb 2013 18:36:02 +0000 (12:36 -0600)
Refactored release scripts to conform to using git archive

When generating a release, there is a risk of missing necessary
source files. This is fixed by using git archive, which also
fixes the lack of conformity between the xfs utilities. As well,
some files may be stale during packaging. This is fixed with a
clean at the beginning of release generation.

Signed-off-by: Andrew Dahl <adahl@sgi.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Makefile
release.sh

index 0bdc5e8cf5260d16e0fd4775b1aeb98f12917cfe..87769cca9561feb84b689a6712b2d21c0dc67ec4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,8 @@ SRCTAR = $(PKG_NAME)-$(PKG_VERSION).tar.gz
 
 CONFIGURE = aclocal.m4 configure config.guess config.sub install-sh ltmain.sh
 LSRCFILES = configure.ac release.sh README VERSION $(CONFIGURE)
+SRCTARINC = m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
+           m4/ltversion.m4 po/xfsprogs.pot $(CONFIGURE)
 
 LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \
        conftest* built .census install.* install-dev.* *.gz \
@@ -144,7 +146,9 @@ $(SRCDIR) : $(_FORCE)
        rm -fr $@
        mkdir -p $@
 
-$(SRCTAR) : default $(SRCDIR)
-       $(Q)$(MAKE) $(MAKEOPTS) source-link
-       unset TAPE; $(TAR) -cf - $(SRCDIR) | $(ZIP) --best > $@ && \
+$(SRCTAR) : default
+       $(Q)git archive --prefix=$(SRCDIR)/ --format=tar v$(PKG_VERSION) > $(SRCDIR).tar 
+       $(Q)$(TAR) --transform "s,^,$(SRCDIR)/," -rf $(SRCDIR).tar \
+          $(SRCTARINC) 
+       $(Q)$(ZIP) $(SRCDIR).tar
        echo Wrote: $@
index debdb81c572199ec39e20e00b9ff505b76ebd007..db5cc74fae712f9dec114e9eb64823346955839e 100755 (executable)
@@ -8,6 +8,9 @@
 version=${PKG_MAJOR}.${PKG_MINOR}.${PKG_REVISION}
 date=`date +"%-d %B %Y"`
 
+echo "Cleaning up"
+make realclean
+
 echo "Updating CHANGES"
 sed -e "s/${version}.*/${version} (${date})/" doc/CHANGES > doc/CHANGES.tmp && \
        mv doc/CHANGES.tmp doc/CHANGES