Skip to content

Commit

Permalink
Add 'make tmp-dist' for testing tarballs, to work around the tag check
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jun 27, 2011
1 parent ed39b69 commit 78f3559
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions Makefile.am
Expand Up @@ -29,19 +29,23 @@ version.c: $(filter-out version.c, $(libopenconnect_la_SOURCES)) \
$(wildcard .git/index .git/refs/tags)
@./version.sh

dist-hook:
tmp-dist: uncommitted-check
$(MAKE) $(AM_MAKEFLAGS) VERSION=$(patsubst v%,%,$(shell git describe --tags)) NODISTHOOK=1 dist

uncommitted-check:
@if ! git update-index --refresh --unmerged || \
! git diff-index --name-only --exit-code HEAD; then \
echo "*** ERROR: Uncommitted changes in above files" >&2; sleep 2 ; exit 12; else echo foo ; fi

dist-hook: uncommitted-check
ifndef NODISTHOOK
@if ! git rev-parse --verify v$(VERSION) > /dev/null; then \
echo "*** ERROR: Version v$(VERSION) is not tagged"; exit 1; fi
@if ! git diff --name-only --exit-code v$(VERSION) HEAD > /dev/null; then \
echo "*** ERROR: Git checkout not at version v$(VERSION)"; exit 1; fi
@git update-index --refresh --unmerged
@if ! git diff-index --name-only --exit-code HEAD; then \
echo "*** ERROR: Uncommitted changes in above files"; exit 1; fi

tag:
@git update-index --refresh --unmerged
@if ! git diff-index --name-only --exit-code HEAD; then \
echo "*** ERROR: Uncommitted changes in above files"; exit 1; fi
endif

tag: uncommitted-check
@if git rev-parse --verify v$(VERSION) > /dev/null; then \
echo "*** ERROR: Version v$(VERSION) is already tagged"; exit 1; fi
@sed 's/AC_INIT.*/AC_INIT(openconnect, $(VERSION))/' -i configure.ac
Expand All @@ -57,4 +61,3 @@ tag:
@git commit -s -m "Tag version $(VERSION)" configure.ac version.sh openconnect.html
@git tag v$(VERSION)
@./autogen.sh

0 comments on commit 78f3559

Please sign in to comment.