Commit 28b19e783f096dff977ab146150f4041678c0a0b

Authored by Antonio Terceiro
1 parent 877161aa

Makefile: require all changes to be committed

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
1 PROJECT = softwarepublico 1 PROJECT = softwarepublico
2 -VERSION ?= $(shell date +%Y.%m.%d) 2 +VERSION = $(shell git describe --tags || date +%Y.%d)
3 3
4 TARBALL = dist/$(PROJECT)-$(VERSION).tar.gz 4 TARBALL = dist/$(PROJECT)-$(VERSION).tar.gz
5 5
@@ -8,6 +8,7 @@ all: @@ -8,6 +8,7 @@ all:
8 sdist: $(TARBALL) 8 sdist: $(TARBALL)
9 9
10 $(TARBALL): $(shell git ls-files) 10 $(TARBALL): $(shell git ls-files)
  11 + @if [ -n "$$(git diff-index HEAD)" ]; then echo "Cannot proceed with uncommitted changes"; false; fi
11 mkdir -p $$(dirname $@) 12 mkdir -p $$(dirname $@)
12 (git archive --prefix=$(PROJECT)-$(VERSION)/ HEAD | gzip -) > $@ 13 (git archive --prefix=$(PROJECT)-$(VERSION)/ HEAD | gzip -) > $@
13 14