Skip to content

Commit

Permalink
Fix: build: never reuse existing tar-file if building modified commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wenningerk committed Nov 19, 2021
1 parent 8db4569 commit a3c5ca5
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions rpm/Makefile.am
Expand Up @@ -114,18 +114,17 @@ distdir = $(top_distdir)/rpm
TARFILE = $(abs_builddir)/../$(top_distdir).tar.gz

export:
if [ -f "$(TARFILE)" ]; then \
echo "`date`: Using existing tarball: $(TARFILE)"; \
else \
cd $(abs_srcdir)/..; \
if [ -n "$(DIRTY_EXT)" ]; then \
git commit -m "DO-NOT-PUSH" -a; \
git archive --prefix=$(top_distdir)/ -o "$(TARFILE)" HEAD^{tree}; \
git reset --mixed HEAD^; \
else \
git archive --prefix=$(top_distdir)/ -o "$(TARFILE)" $(TAG)^{tree}; \
fi; \
echo "`date`: Rebuilt $(TARFILE)"; \
cd $(abs_srcdir)/..; \
if [ -n "$(DIRTY_EXT)" ]; then \
git commit -m "DO-NOT-PUSH" -a; \
git archive --prefix=$(top_distdir)/ -o "$(TARFILE)" HEAD^{tree}; \
git reset --mixed HEAD^; \
echo "`date`: Rebuilt $(TARFILE)"; \
elif [ -f "$(TARFILE)" ]; then \
echo "`date`: Using existing tarball: $(TARFILE)"; \
else \
git archive --prefix=$(top_distdir)/ -o "$(TARFILE)" $(TAG)^{tree}; \
echo "`date`: Rebuilt $(TARFILE)"; \
fi

# Depend on spec-clean so the spec gets rebuilt every time
Expand Down

0 comments on commit a3c5ca5

Please sign in to comment.