diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-23 13:21:15 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-23 13:24:17 +0100 |
commit | fee24dc2b0f62103683e6ce242a44c7306a5fb1d (patch) | |
tree | f4a090dfe4e192d246d2b5b8aebe95aa11f76c8a | |
parent | 7d8d72371dcbf012fed1a78615b7abb3644648d9 (diff) |
Makefile: check for local modifications before snapshotting
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -35,7 +35,7 @@ sha1_file = $(tar_file).sha1 gpg_file = $(sha1_file).asc DIST := Makefile README $(wildcard *.c) $(ALL_LZMA) -$(tar_file): Makefile +$(tar_file): $(DIST) @mkdir -p $(snapshots) @echo Generating snapshot tarball: $(tar_file) @tar $(TAR_OPTIONS) --transform 's#^#cairo-traces/#' -czvf $(tar_file) $(DIST) @@ -47,7 +47,13 @@ $(gpg_file): $(sha1_file) @echo "Please enter your GPG password to sign the checksum." gpg --armor --sign $^ -snapshot: $(gpg_file) +snapshot-dirty: + @if test -n "$(shell git ls-files -m $(DIST))"; then \ + echo "Local tree has uncommitted modifications. Please commit these changes before making a snapshot." ; \ + exit 1; \ + fi + +snapshot: snapshot-dirty $(gpg_file) snapshot-upload: snapshot scp $(tar_file) $(sha1_file) $(gpg_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR) |