Skip to content

Commit

Permalink
build: update monorepo makefile targets (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi authored Sep 16, 2024
1 parent 19cc72b commit 268341f
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
.PHONY: test
test: composer-dump composer-validate phpstan psalm phpunit

.PHONY: monorepo
monorepo: validate merge

.PHONY: merge
merge:
vendor/bin/monorepo-builder merge

.PHONY: validate
validate:
vendor/bin/monorepo-builder validate

.PHONY: phpstan
phpstan:
vendor/bin/phpstan analyse
Expand Down Expand Up @@ -45,3 +34,23 @@ tools/php-cs-fixer:
rector:
$(PHP) vendor/bin/rector process > rector.log
make php-cs-fixer

.PHONY: monorepo
monorepo: monorepo-validate monorepo-merge

.PHONY: monorepo-validate
monorepo-validate:
vendor/bin/monorepo-builder validate

.PHONY: monorepo-merge
monorepo-merge:
$(PHP) vendor/bin/monorepo-builder merge

.PHONY: monorepo-release-%
monorepo-release-%:
git update-index --really-refresh > /dev/null; git diff-index --quiet HEAD || (echo "Working directory is not clean, aborting" && exit 1)
[ $$(git branch --show-current) == main ] || (echo "Not on main branch, aborting" && exit 1)
$(PHP) vendor/bin/monorepo-builder release $*
git switch -c release/$*
git add .
git commit -m "release: $*"

0 comments on commit 268341f

Please sign in to comment.