summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-08-28 10:14:11 -0400
committerColin Walters <walters@verbum.org>2012-08-28 10:14:11 -0400
commitc690416b72b6e0f6989e5c8acfa59d67813fc358 (patch)
treeb39c1f56e2cddd2f666eb95cf73d4f0878b62db1 /Makefile.am
parent60368fae76e3141d60a42154f9b4d85d93002a2e (diff)
downloadostree-c690416b72b6e0f6989e5c8acfa59d67813fc358.tar.gz
build: Add dist-snapshot
Take the current git HEAD and make a tarball from it; should be useful for putting snapshots into Poky.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 7dac9097..b8a99b49 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -153,3 +153,20 @@ srpm-embedded:
GITVERSION=$(git_version_rpm); export GITVERSION; \
(sed -e "s,^Version:.*,Version: $${GITVERSION}," $(srcdir)/packages/ostree.spec.in) > ostree.spec
$(srcdir)/packages/rpmbuild-cwd -bs ostree.spec
+
+dist-snapshot:
+ set -x; \
+ GITVERSION=$(git_version_rpm); export GITVERSION; \
+ TARFILE_TMP=ostree-$${GITVERSION}.tar.tmp; \
+ REV=$$(git rev-parse HEAD); \
+ echo "Archiving ostree at $${REV}"; \
+ (cd $(srcdir); git archive --format=tar --prefix=ostree-$${GITVERSION}/ $${REV}) > $${TARFILE_TMP}; \
+ (cd $$(git rev-parse --show-toplevel); git submodule status) | while read line; do \
+ rev=$$(echo $$line | cut -f 1 -d ' '); path=$$(echo $$line | cut -f 2 -d ' '); \
+ echo "Archiving $${path} at $${rev}"; \
+ (cd $(srcdir)/$$path; git archive --format=tar --prefix=ostree-$${GITVERSION}/$$path/ $${rev}) > submodule.tar; \
+ tar -A -f $${TARFILE_TMP} submodule.tar; \
+ rm submodule.tar; \
+ done; \
+ mv ostree-$${GITVERSION}.tar{.tmp,}; \
+ gzip -f ostree-$${GITVERSION}.tar