Skip to content

Commit

Permalink
Docs and various bug fixes (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaEstes authored Oct 21, 2023
1 parent 5885335 commit 8549c29
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 27 deletions.
14 changes: 1 addition & 13 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,38 @@
docs:
documentation:
- docs/*

Bard:
- docs/bard/*
- packages/bard/*
- src/SonsOfPHP/Bard/*

Clock:
- docs/components/clock/*
- packages/clock/*
- src/SonsOfPHP/Component/Clock/*

CQRS:
- docs/components/cqrs/*
- packages/cqrs/*
- packages/cqrs-symfony/*
- src/SonsOfPHP/**/Cqrs/*

EventDispatcher:
- docs/components/event-dispatcher/*
- packages/event-dispatcher/*
- src/SonsOfPHP/**/EventDispatcher/*

EventSourcing:
- docs/components/event-sourcing/*
- packages/event-sourcing/*
- packages/event-sourcing-doctrine/*
- packages/event-sourcing-symfony/*
- src/SonsOfPHP/**/EventSourcing/*

FeatureToggle:
- docs/components/feature-toggle/*
- packages/feature-toggle/*
- src/SonsOfPHP/**/FeatureToggle/*

JSON:
- docs/components/json/*
- packages/json/*
- src/SonsOfPHP/**/Json/*

Money:
- docs/components/money/*
- packages/money/*
- src/SonsOfPHP/**/Money/*

Version:
- docs/components/version/*
- packages/version/*
- src/SonsOfPHP/**/Version/*
1 change: 1 addition & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ jobs:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
23 changes: 13 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PHP_CS_FIXER = tools/php-cs-fixer/vendor/bin/php-cs-fixer
PHPUNIT = tools/phpunit/vendor/bin/phpunit
PSALM = tools/psalm/vendor/bin/psalm
PSALM_BASELINE_FILE = psalm-baseline.xml
BARD = packages/bard/bin/bard
BARD = src/SonsOfPHP/Bard/bin/bard

COVERAGE_DIR = docs/coverage

Expand All @@ -30,10 +30,13 @@ upgrade: tools-upgrade

composer-install: composer.json # Install Dependencies via Composer
XDEBUG_MODE=off $(COMPOSER) install --no-interaction --prefer-dist --optimize-autoloader
XDEBUG_MODE=off $(COMPOSER) install --working-dir=packages/bard --no-interaction --prefer-dist --optimize-autoloader
XDEBUG_MODE=off $(COMPOSER) install --working-dir=src/SonsOfPHP/Bard --no-interaction --prefer-dist --optimize-autoloader

purge: # Purge vendor and lock files
rm -rf vendor/ packages/*/vendor/ packages/*/composer.lock
rm -rf vendor/ src/SonsOfPHP/Bard/vendor/ src/SonsOfPHP/Bard/composer.lock
rm -rf vendor/ src/SonsOfPHP/Bridge/*/vendor/ src/SonsOfPHP/Bridge/*/composer.lock
rm -rf vendor/ src/SonsOfPHP/Bundle/*/vendor/ src/SonsOfPHP/Bundle/*/composer.lock
rm -rf vendor/ src/SonsOfPHP/Component/*/vendor/ src/SonsOfPHP/Component/*/composer.lock

test: ## Run PHPUnit Tests
XDEBUG_MODE=off $(PHP) -dxdebug.mode=off $(PHPUNIT) --order-by=defects
Expand All @@ -49,7 +52,7 @@ phpunit-upgrade:
lint: lint-php ## Lint files

lint-php: # lint php files
@! find packages/ -name "*.php" -not -path "packages/**/vendor/*" | xargs -I{} $(PHP) -l '{}' | grep -v "No syntax errors detected"
find src -name "*.php" -not -path "src/**/vendor/*" | xargs -I{} $(PHP) -l '{}'

coverage: ## Build Code Coverage Report
XDEBUG_MODE=coverage $(PHP) -dxdebug.mode=coverage $(PHPUNIT) --coverage-html $(COVERAGE_DIR)
Expand Down Expand Up @@ -85,21 +88,21 @@ tools-install: psalm-install php-cs-fixer-install phpunit-install

tools-upgrade: psalm-upgrade php-cs-fixer-upgrade phpunit-upgrade

# Install deps for building docs
docs-install:
## Documentation
docs-install: ## Install deps for building docs
pip install mkdocs
pip install mkdocs-material

docs-upgrade:
docs-upgrade: ## upgrade mkdocs
pip install --upgrade mkdocs-material

docs-watch: # Preview documentation locally
docs-watch: ## Preview documentation locally
$(MKDOCS) serve

docs-build: # Build Site
docs-build: ## Build Site
$(MKDOCS) build

## Packages
## Package Management
packages-install: ## Runs `composer install` on each package
$(BARD) install -n -vvv

Expand Down
38 changes: 38 additions & 0 deletions docs/bard/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Bard
---

# Bard

Bard is used to manage monorepos.

## Usage

Initialize a new bard.json file

```shell
bard init
```

Add repositories

```shell
bard add path/to/code repoUrl
```

Push changes to read-only repos

```shell
bard push
```

Create a release

```shell
bard release major
bard release minor
bard release patch
```

Bard will track the versions so you can just use the keywords: major, minor,
patch.
20 changes: 16 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,31 @@

<testsuites>
<testsuite name="all">
<directory>packages/*/Tests</directory>
<!--<directory>src/SonsOfPHP/Bard/src/Tests</directory>-->
<directory>src/SonsOfPHP/Bridge/Doctrine/*/Tests</directory>
<directory>src/SonsOfPHP/Bridge/Symfony/*/Tests</directory>
<directory>src/SonsOfPHP/Bundle/*/Tests</directory>
<directory>src/SonsOfPHP/Component/*/Tests</directory>
</testsuite>
</testsuites>

<coverage/>

<source>
<include>
<directory>packages/*</directory>
<directory>src/*</directory>
</include>
<exclude>
<directory>packages/*/Tests</directory>
<directory>packages/*/vendor</directory>
<!--<directory>src/SonsOfPHP/Bard/src/Tests</directory>-->
<directory>src/SonsOfPHP/Bard/vendor</directory>
<directory>src/SonsOfPHP/Bridge/Doctrine/*/Tests</directory>
<directory>src/SonsOfPHP/Bridge/Doctrine/*/vendor</directory>
<directory>src/SonsOfPHP/Bridge/Symfony/*/Tests</directory>
<directory>src/SonsOfPHP/Bridge/Symfony/*/vendor</directory>
<directory>src/SonsOfPHP/Bundle/*/Tests</directory>
<directory>src/SonsOfPHP/Bundle/*/vendor</directory>
<directory>src/SonsOfPHP/Component/*/Tests</directory>
<directory>src/SonsOfPHP/Component/*/vendor</directory>
</exclude>
</source>

Expand Down

0 comments on commit 8549c29

Please sign in to comment.