Skip to content

Commit

Permalink
build: update monorepo management (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi authored Sep 16, 2024
1 parent 7bde8f4 commit 8e7f48f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* chore: update coding style
* feat: support Symfony 7 & PHP 8.4
* build: rectorization
* build: update monorepo management

## 1.1.0

Expand Down
23 changes: 16 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@
test: phpstan psalm phpunit

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

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

.PHONY: validate
validate:
.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: $*"

.PHONY: phpstan
phpstan:
vendor/bin/phpstan analyse
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^10.5",
"psalm/plugin-phpunit": "^0.18.4",
"symplify/monorepo-builder": "^11.2",
"symplify/monorepo-builder": "^11.2.20 || ^11.3",
"vimeo/psalm": "^5.26",
"rector/rector": "^1.2"
},
Expand Down

0 comments on commit 8e7f48f

Please sign in to comment.