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