-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
021a49f
commit cb524aa
Showing
7 changed files
with
617 additions
and
0 deletions.
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 @@ | ||
eol=lf |
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,3 @@ | ||
vendor/** | ||
.idea | ||
.php_cs.cache |
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,41 @@ | ||
<?php | ||
|
||
|
||
return PhpCsFixer\Config::create() | ||
->setUsingCache(true) | ||
->setRiskyAllowed(true) | ||
->setCacheFile(__DIR__ . '/.php_cs.cache') | ||
->setRules(array( | ||
'@PSR1' => true, | ||
'@PSR2' => true, | ||
'@Symfony' => true, | ||
'psr4' => true, | ||
// Custom rules | ||
'align_multiline_comment' => array('comment_type' => 'phpdocs_only'), // PSR-5 | ||
'phpdoc_to_comment' => false, | ||
'array_indentation' => true, | ||
'array_syntax' => array('syntax' => 'short'), | ||
'cast_spaces' => array('space' => 'none'), | ||
'concat_space' => array('spacing' => 'one'), | ||
'compact_nullable_typehint' => true, | ||
'declare_equal_normalize' => array('space' => 'single'), | ||
'increment_style' => array('style' => 'post'), | ||
'list_syntax' => array('syntax' => 'long'), | ||
'no_short_echo_tag' => true, | ||
'phpdoc_align' => false, | ||
'phpdoc_no_empty_return' => false, | ||
'phpdoc_order' => true, // PSR-5 | ||
'phpdoc_no_useless_inheritdoc' => false, | ||
'protected_to_private' => false, | ||
'yoda_style' => false, | ||
'method_argument_space' => array('on_multiline' => 'ensure_fully_multiline'), | ||
'ordered_imports' => array( | ||
'sort_algorithm' => 'alpha', | ||
'imports_order' => array('class', 'const', 'function') | ||
), | ||
)) | ||
->setFinder(PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->name('*.php') | ||
->ignoreDotFiles(true) | ||
->ignoreVCS(true)); |
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,30 @@ | ||
# PHP Conventional Changelog | ||
|
||
## 📖 Installation | ||
|
||
You can install it easily with composer | ||
|
||
`composer require --dev marcocesarato/php-conventional-changelog` | ||
|
||
## 💻 Usage | ||
|
||
Generate a changelog without committing files: | ||
|
||
`php vendor/bin/conventional-changelog` | ||
|
||
or with auto commit and auto version tagging: | ||
|
||
`php vendor/bin/conventional-changelog --commit` | ||
|
||
### Commands List | ||
|
||
``` | ||
-c --commit bool Commit the new release once changelog is generated | ||
-f --from-date str Get commits from specified date | ||
-h --help bool Show the helper with all commands available | ||
-m --major bool Major release (important changes) | ||
-n --minor bool Minor release (add functionality) | ||
-p --patch bool Patch release (bug fixes) | ||
-t --to-date str Get commits from today (or specified on --from-date) to specified date | ||
-v --version str Specify next release version code (Semver) | ||
``` |
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,19 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use ConventionalChangelog\Generator; | ||
|
||
$mainFile = __DIR__ .'/../src/Generator.php'; | ||
if(is_file($mainFile)) { | ||
require_once $mainFile; | ||
} | ||
|
||
foreach ([__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php'] as $file) { | ||
if (file_exists($file)) { | ||
require_once $file; | ||
break; | ||
} | ||
} | ||
|
||
$app = new Generator(); | ||
$app->run(); |
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,48 @@ | ||
{ | ||
"name": "marcocesarato/php-conventional-changelog", | ||
"description": "Generate changelogs and release notes from a project's commit messages and metadata using php composer.", | ||
"type": "library", | ||
"license": "GPL-3.0-or-later", | ||
"minimum-stability": "stable", | ||
"bin": [ | ||
"conventional-changelog" | ||
], | ||
"keywords": [ | ||
"conventional-changelog", | ||
"readme", | ||
"generation", | ||
"git", | ||
"php", | ||
"conventional-commit", | ||
"conventional-commits", | ||
"conventionalcommits", | ||
"changelog", | ||
"history", | ||
"tag", | ||
"commit", | ||
"commits", | ||
"conventional", | ||
"convention", | ||
"conventional-changelog-preset" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Marco Cesarato", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"ConventionalChangelog\\": "src/" | ||
} | ||
}, | ||
"scripts": { | ||
"fix-cs": "vendor/bin/php-cs-fixer fix --config=.php_cs" | ||
}, | ||
"require-dev": { | ||
"friendsofphp/php-cs-fixer": "^2.17" | ||
}, | ||
"require": { | ||
"php": ">=5.5" | ||
} | ||
} |
Oops, something went wrong.