diff --git a/Makefile b/Makefile index 7269f15..0707225 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,28 @@ coverage: ## Executes the test suite and creates code coverage reports view-coverage: ## Shows the code coverage report open build/coverage/index.html +api: ## Generates api-docs + wget -O vendor/bin/phpdoc http://www.phpdoc.org/phpDocumentor.phar + chmod +x vendor/bin/phpdoc + vendor/bin/phpdoc + +distro: ## Generates distribution + mkdir distro + touch .libpairtwo-distro + git add -A + git commit -m "Commit before release" + cp res/composer-dist.json distro/composer.json + cd distro && composer install + rm distro/composer.json + cp res/composer-dist-installed.json distro/composer.json + git reset --soft HEAD^ + wget -O vendor/bin/phpdoc http://www.phpdoc.org/phpDocumentor.phar + chmod +x vendor/bin/phpdoc + vendor/bin/phpdoc + mkdir -p distro/doc + cp -r doc/api distro/doc + cd distro && zip -r ../libpairtwo-distro * + cs: ## Fixes coding standard problems vendor/bin/php-cs-fixer fix || true diff --git a/res/composer-dist-installed.json b/res/composer-dist-installed.json new file mode 100644 index 0000000..ca48629 --- /dev/null +++ b/res/composer-dist-installed.json @@ -0,0 +1,5 @@ +{ + "require": { + "jeroened/libpairtwo": "^1.0" + }, +} \ No newline at end of file diff --git a/res/composer-dist.json b/res/composer-dist.json new file mode 100644 index 0000000..7aece67 --- /dev/null +++ b/res/composer-dist.json @@ -0,0 +1,12 @@ +{ + "repositories": [ + { + "type": "git", + "url": "../" + } + ], + "require": { + "jeroened/libpairtwo": "*" + }, + "minimum-stability": "dev" +} \ No newline at end of file