diff --git a/Makefile b/Makefile index 739a939..5529f18 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: help tests dist .DEFAULT_GOAL := help BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -VERSION := $(if $(TAG),$(TAG),$(BRANCH)) +VERSION := $(if $(TAG),$(TAG),dev-$(BRANCH)) help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-12s\033[0m %s\n", $$1, $$2}' @@ -21,6 +21,7 @@ api: ## Generates api-docs dist: ## Generates distribution cp dist/composer* res/ mv dist/composer-dist.json dist/composer.json + sed -i -e "s%//VERSION//%$(VERSION)%g" dist/composer.json cd dist && composer install rm dist/composer.json rm dist/composer.lock diff --git a/dist/composer-dist.json b/dist/composer-dist.json index 7aece67..7de20d9 100644 --- a/dist/composer-dist.json +++ b/dist/composer-dist.json @@ -6,7 +6,7 @@ } ], "require": { - "jeroened/libpairtwo": "*" + "jeroened/libpairtwo": "//VERSION//" }, "minimum-stability": "dev" } \ No newline at end of file