diff --git a/Makefile b/Makefile index 4aed587..bf75994 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,20 @@ -PACKAGE_VERSION := $(shell cat ./VERSION) +PROJECT_VERSION := $(shell cat ./VERSION) MVN_OPTIONS ?= -T 1C -compile: set_version +compile: .version mvn $(MVN_OPTIONS) compile -install: set_version +install: .version mvn $(MVN_OPTIONS) install -deploy: set_version +deploy: .version mvn $(MVN_OPTIONS) deploy -set_version: - mvn $(MVN_OPTIONS) versions:set -DallowSnapshots=true -DnewVersion="$(PACKAGE_VERSION)" || true +.version: VERSION + mvn $(MVN_OPTIONS) versions:set -DallowSnapshots=true -DnewVersion="$(PROJECT_VERSION)" || true mvn $(MVN_OPTIONS) versions:commit + echo "$(PROJECT_VERSION)" > .version clean: - mvn $(MVN_OPTIONS) clean \ No newline at end of file + mvn $(MVN_OPTIONS) clean + rm -f .version \ No newline at end of file