[PATCH 1/4] xfsprogs: Refactor release scripts to conform to using git archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 Makefile   |   11 ++++++++---
 release.sh |    3 +++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 0bdc5e8..e73af88 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 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,10 @@ $(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) \
+	  -o $(SRCDIR).tar
+	$(Q)$(TAR) --transform "s,^,$(SRCDIR)/," -rf $(SRCARC).tar \
+	   $(SRCTARINC) 
+	$(Q)$(ZIP) $(SRCDIR).tar
 	echo Wrote: $@
diff --git a/release.sh b/release.sh
index debdb81..db5cc74 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
-- 
1.7.1

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs

[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux