Skip to content

Commit f4a87c5

Browse files
Andrey Sokolovkeremet
Andrey Sokolov
authored andcommitted
Fix annoying git fatal message
1 parent 452bdcb commit f4a87c5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Makefile

+4-5
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ $(EXTENSION)--$(EXTVERSION).sql: setup.sql
2828
cat $^ > $@
2929

3030
# Prepare the package for PGXN submission
31-
DISTVERSION := $(shell git tag -l | tail -n 1 | cut -d 'v' -f 2)
32-
package: dist dist/$(EXTENSION)-$(DISTVERSION).zip
31+
package: dist .git
32+
$(eval DISTVERSION := $(shell git tag -l | tail -n 1 | cut -d 'v' -f 2))
33+
$(info Generating zip file for version $(DISTVERSION)...)
34+
git archive --format zip --prefix=$(EXTENSION)-${DISTVERSION}/ --output dist/$(EXTENSION)-${DISTVERSION}.zip HEAD
3335

3436
dist:
3537
mkdir -p dist
36-
37-
dist/$(EXTENSION)-$(DISTVERSION).zip:
38-
git archive --format zip --prefix=$(EXTENSION)-$(DISTVERSION)/ --output $@ HEAD

0 commit comments

Comments
 (0)