-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add VERSION constants within AutoMapper class and use it to cache tra…
…nsformers (#21) * Add VERSION constants within AutoMapper class and use it to cache transformers * Add some documentation about contributing & releases * Add static version check in CI
- Loading branch information
Showing
7 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
LAST_TAG=`git describe --tags --abbrev=0` | ||
IFS=. components=(${LAST_TAG##*-}) | ||
exit `php -r "require_once __DIR__.'/vendor/autoload.php'; use AutoMapper\AutoMapper; echo (AutoMapper::MAJOR_VERSION >= intval(\"${components[0]}\") && AutoMapper::MINOR_VERSION >= intval(\"${components[1]}\")) ? 0 : 1;"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,3 +61,23 @@ jobs: | |
run: composer update --prefer-stable | ||
- name: tests | ||
run: vendor/bin/phpunit | ||
check-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@master | ||
- name: cache-composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/ | ||
key: composer-${{ github.sha }} | ||
- name: setup | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: 8.2 | ||
coverage: none | ||
extensions: mbstring, fileinfo, json, intl, dom | ||
- name: composer install | ||
run: composer update --prefer-stable | ||
- name: check version | ||
run: ./.github/scripts/check-version.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Contributing | ||
|
||
## Releasing | ||
|
||
Whenever you're doing a release you need to do some updates in order for the project to keep history on what was done | ||
and some other stuff. | ||
|
||
### Changelog | ||
|
||
First you'll need to update the CHANGELOG file (`./CHANGELOG.md`), take everything under the `Unreleased` section and | ||
create a new section for your new tag with the today's date. | ||
|
||
### Version | ||
|
||
When a new version is tagged, you have to update the version constants within the `AutoMapper/AutoMapper` so | ||
transformers can be updated with last AutoMapper version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
- [Quick start](/) | ||
- [Symfony](/symfony) | ||
- [Symfony](/symfony) | ||
- [Contributing](/contributing) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters