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 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 across all utilities. Signed-off-by: Andrew Dahl <adahl@xxxxxxx> --- Makefile | 19 +++++++++++++++++++ Makepkgs | 4 ++-- build/Makefile | 22 +--------------------- release.sh | 5 ++++- 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 0bddb07..58e5caf 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,8 @@ ifeq ($(HAVE_BUILDDEFS), yes) include $(TOPDIR)/include/builddefs endif +SRCTAR=$(PKG_NAME)-$(PKG_VERSION).tar.gz + CONFIGURE = aclocal.m4 configure config.guess config.sub configure install-sh \ ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \ m4/ltversion.m4 m4/lt~obsolete.m4 @@ -84,3 +86,19 @@ distclean: clean realclean: distclean rm -f $(CONFIGURE) + +dist: default +ifeq ($(HAVE_BUILDDEFS), no) + $(MAKE) $(MAKEOPTS) -C . $@ +else + $(MAKE) $(MAKEOPTS) $(SRCTAR) + $(MAKE) $(MAKEOPTS) -C build dist +endif + +$(SRCTAR) : default + git archive --prefix=$(PKG_NAME)-$(PKG_VERSION)/ --format=tar \ + v$(PKG_VERSION) -o $(PKG_NAME)-$(PKG_VERSION).tar + $(TAR) --transform "s,^,$(PKG_NAME)-$(PKG_VERSION)/," \ + -rf $(PKG_NAME)-$(PKG_VERSION).tar $(CONFIGURE) + $(ZIP) $(PKG_NAME)-$(PKG_VERSION).tar + echo Wrote: $@ diff --git a/Makepkgs b/Makepkgs index e3f9e0c..da08617 100755 --- a/Makepkgs +++ b/Makepkgs @@ -79,9 +79,9 @@ echo echo "== dist, log is $LOGDIR/dist" [ ! -f .census ] && touch .census if $verbose ; then - $MAKE -C build dist 2>&1 | tee $LOGDIR/dist + $MAKE dist 2>&1 | tee $LOGDIR/dist else - $MAKE -C build dist > $LOGDIR/dist 2>&1 || exit 1 + $MAKE dist > $LOGDIR/dist 2>&1 || exit 1 grep '^Wrote:' $LOGDIR/dist | sed -e 's/\.\.\/\.\.\///' fi diff --git a/build/Makefile b/build/Makefile index 200c249..96341a3 100644 --- a/build/Makefile +++ b/build/Makefile @@ -5,9 +5,6 @@ TOPDIR = .. include $(TOPDIR)/include/builddefs -MANIFEST=src-manifest -SRCTAR=$(PKG_NAME)-$(PKG_VERSION).tar.gz - LDIRT = *-manifest *.gz $(TOPDIR)/$(PKG_NAME)-* # for clean and clobber @@ -18,24 +15,7 @@ default install install-dev install-lib: include $(BUILDRULES) -# Symlink in the TOPDIR is used to pack files relative to -# product-version directory. -$(MANIFEST) : $(_FORCE) - @if [ ! -L $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ] ; then \ - $(LN_S) . $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ; \ - fi - @CDIR=`pwd`; cd $(TOPDIR); \ - $(MAKE) --no-print-directory source | \ - sed -e 's/^\./$(PKG_NAME)-$(PKG_VERSION)/' > $$CDIR/$@ ;\ - if [ $$? -ne 0 ] ; then \ - exit 1; \ - else \ - unset TAPE; \ - $(TAR) -T $$CDIR/$@ -cf - | $(ZIP) --best > $$CDIR/$(SRCTAR); \ - echo Wrote: $$CDIR/$(SRCTAR); \ - fi - -dist : default $(MANIFEST) +dist : default @DIST_MANIFEST=`pwd`/bin-manifest; DIST_ROOT=/tmp/$$$$; \ export DIST_MANIFEST DIST_ROOT; \ rm -f $$DIST_MANIFEST; \ diff --git a/release.sh b/release.sh index 31d5e96..f1ec9b2 100755 --- a/release.sh +++ b/release.sh @@ -3,11 +3,14 @@ # Automate generation a new release # -. VERSION +. ./VERSION 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 -- 1.7.1
_______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs