aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Dahl <adahl@sgi.com>2013-01-14 12:16:39 -0600
committerBen Myers <bpm@sgi.com>2013-02-01 10:56:40 -0600
commitef0b99a1b4ad1ddc01136cdf1b77db67ac83659f (patch)
treed88ca375f128627c9376264fbf310d145ccd8afb
parenteebd31aa94ea30cecb87036879f207a5e22f2885 (diff)
downloadxfsdump-dev-ef0b99a1b4ad1ddc01136cdf1b77db67ac83659f.tar.gz
xfsdump: Refactor release scripts to conform to using git archive
Refactored release scripts to conform to using git archive When generating a release, there is a risk of some files being stale, such as configure and the m4/autotools temp files. This is fixed with a clean at the beginning of the release generation. In addition, there is no uniformity in the current method of source tar generation between xfs utilities. Using git archive solves this issue accross all utilities. Signed-off-by: Andrew Dahl <adahl@sgi.com> Reviewed-by: Ben Myers <bpm@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
-rw-r--r--Makefile10
-rwxr-xr-xrelease.sh3
2 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 39881af6..7417da3e 100644
--- 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 $(CONFIGURE)
LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \
conftest* built .census install.* install-dev.* *.gz \
@@ -124,7 +126,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: $@
diff --git a/release.sh b/release.sh
index 25a17324..e34b3970 100755
--- a/release.sh
+++ b/release.sh
@@ -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