Commit 61eed96a authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

factored git-revision out into rule. Added release rule.

parent ff43f916
......@@ -2,6 +2,7 @@ PHPDOC ?= support/pear/phpdoc
JSDOC ?= jsdoc
PKG_VERSION = $(shell awk '/version/ { print $$3 }' extension/ext_emconf.php | sed "s/'//g")
NIGHTLY_DATE = $(shell date '+%Y%m%d')
RELEASE_DATE = $(shell date '+%Y%m%d%H%M')
GIT_REVISION_SHORT = $(shell git rev-parse --short HEAD || true)
GIT_REVISION_LONG = $(shell git rev-parse HEAD || true)
EXTENSION_CONTENT = Classes Configuration Documentation qfq Resources ext_emconf.php ext_localconf.php ext_tables.php ext_icon.png config.example.ini
......@@ -22,13 +23,18 @@
rm -f qfq_$(PKG_VERSION).zip
nightly: bootstrap
echo $(GIT_REVISION_LONG) > extension/revision.git
nightly: bootstrap git-revision
cd extension; zip -r ../qfq-$(NIGHTLY_DATE) $(EXTENSION_CONTENT) revision.git -x config.ini
snapshot: bootstrap
echo $(GIT_REVISION_LONG) > extension/revision.git
cd extension ; zip -r ../qfq-$(NIGHTLY_DATE)-$(GIT_REVISION_SHORT) $(EXTENSION_CONTENT) revision.git -x config.ini
snapshot: bootstrap git-revision
cd extension ; zip -r ../qfq-$(NIGHTLY_DATE)-$(GIT_REVISION_SHORT) $(EXTENSION_CONTENT) revision.git -x config.ini
release: bootstrap git-revision
test -z "$${VERSION}" && echo "Set VERSION environment variable to the release version (fmt: maj.min.micro)"
cd extension ; zip -r "../qfq.$${VERSION}_$${RELEASE_DATE}" $(EXTENSION_CONTENT) revision.git -x config.ini
......@@ -84,4 +90,4 @@ phpdoc: .phpdocinstall
mkdir -p doc/plantuml/php
touch $@
.PHONY: nightly maintainer-clean
.PHONY: nightly maintainer-clean snapshot release revision.git
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment