PHP Addition Repository Maker
This repository contains a structure to easily setup a Makefile
Installation
- Install the library via composer by running:
composer require --dev par/maker
- Add the top of your
Makefile
add the following:
export MAKER_PATH ?= vendor/par/maker
-include $(MAKER_PATH)/Makefile
- Add custom targets to your
Makefile
:
.PHONY: init build test clean
## Init project
init:
@exit 0;
## Clean project
clean:
@rm -rf vendor .phpunit.result.cache clover.xml
## Build project
build:
@composer install --no-interaction
# Test project
test:
@composer validate
@composer check
Usage
Available targets:
git/tag Create git tag GIT_TAG=...
git/tags/push Push all git tags
help Help screen
help/all Display help for all targets
help/short This help short screen
release/major Tag current commit as major release
release/minor Tag current commit as minor release
release/patch Tag current commit as patch release
version/current Show current version
version/next/major Show next major version
version/next/minor Show next minor version
version/next/patch Show next patch version