Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for updating the version of the repo #1262

Merged
merged 2 commits into from
Apr 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 6 additions & 30 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,7 @@
export PHPDOCUMENTOR_VERSION := v3.0.0
.PHONY: codegen-format update-version
update-version:
@echo "$(VERSION)" > VERSION
@perl -pi -e 's|VERSION = '\''[.\d]+'\''|VERSION = '\''$(VERSION)'\''|' lib/Stripe.php

vendor: composer.json
composer install

vendor/bin/phpdoc: vendor
curl -sfL https://github.com/phpDocumentor/phpDocumentor/releases/download/$(PHPDOCUMENTOR_VERSION)/phpDocumentor.phar -o vendor/bin/phpdoc
chmod +x vendor/bin/phpdoc

test: vendor
vendor/bin/phpunit
.PHONY: test

fmt: vendor
vendor/bin/php-cs-fixer fix -v --using-cache=no .
.PHONY: fmt

fmtcheck: vendor
vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no .
.PHONY: fmtcheck

phpdoc: vendor/bin/phpdoc
vendor/bin/phpdoc

phpstan: vendor
php -d memory_limit=512M vendor/bin/phpstan analyse lib tests
.PHONY: phpstan

phpstan-baseline: vendor/bin/phpstan
php -d memory_limit=512M vendor/bin/phpstan analyse lib tests --generate-baseline
.PHONY: phpstan-baseline
codegen-format:
composer install && ./vendor/bin/php-cs-fixer fix -v --using-cache=no .