Add commit hash on make
This commit is contained in:
parent
5e12b93756
commit
c420041d3c
1 changed files with 3 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -1,4 +1,5 @@
|
||||||
DESTDIR=public
|
DESTDIR=public
|
||||||
|
VERSION=$(shell git describe --exact-match --tags $(shell git log -n1 --pretty='%h') || echo "git - $(shell git rev-parse --short HEAD)")
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Options:"
|
@echo "Options:"
|
||||||
|
@ -9,3 +10,4 @@ all:
|
||||||
install src/*.php $(DESTDIR)
|
install src/*.php $(DESTDIR)
|
||||||
cp -r src/static $(DESTDIR)
|
cp -r src/static $(DESTDIR)
|
||||||
install .htaccess $(DESTDIR)
|
install .htaccess $(DESTDIR)
|
||||||
|
printf "<?php\n\$$VERSION = \"${VERSION}\";\n" > ${DESTDIR}/version.php
|
Loading…
Reference in a new issue