Add commit hash on make

This commit is contained in:
Dorian Zedler 2022-05-12 17:27:53 +02:00
parent 5e12b93756
commit c420041d3c
Signed by: dorian
GPG Key ID: 989DE36109AFA354
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
DESTDIR=public
VERSION=$(shell git describe --exact-match --tags $(shell git log -n1 --pretty='%h') || echo "git - $(shell git rev-parse --short HEAD)")
help:
@echo "Options:"
@ -8,4 +9,5 @@ all:
install -d $(DESTDIR)
install src/*.php $(DESTDIR)
cp -r src/static $(DESTDIR)
install .htaccess $(DESTDIR)
install .htaccess $(DESTDIR)
printf "<?php\n\$$VERSION = \"${VERSION}\";\n" > ${DESTDIR}/version.php