Skip to content

Commit

Permalink
Removed laravel dependency, made the tool standalone.
Browse files Browse the repository at this point in the history
  • Loading branch information
phpfour committed Aug 14, 2017
1 parent d20249e commit 0c088bc
Show file tree
Hide file tree
Showing 9 changed files with 187 additions and 499 deletions.
45 changes: 17 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,43 @@
## Release Note Generator

This is a Laravel package that generates markdown formatted release notes between two branches/tags.
This is a command line tool that generates markdown formatted release notes between two branches/tags.

## Installation

Install the package via composer:
Install the package globally via composer:

``` sh
composer require foodkit/jira-release-notes
composer require foodkit/jira-release-notes --global
```

Register the service provider:
## Configuration

```
// config/app.php
'providers' => [
// ...
FoodKit\ReleaseNote\Provider\ReleaseNoteServiceProvider::class,
];
The following configuration parameters can be passed as argument:

```
* `--host` issue tracker host (https://project.atlassian.net)
* `--user` issue tracker username
* `--pass` issue tracker password
* `--regex` issue prefix regular expression

To publish the config file to `config/release-notes.php` run:
Or, they can be placed in `.env` file within a project:

``` sh
php artisan vendor:publish --provider="FoodKit\ReleaseNote\Provider\ReleaseNoteServiceProvider"
```

Next add the `FoodKit\ReleaseNote\Commands\GenerateReleaseNote` class to your console kernel.

```text-html-php
// app/Console/Kernel.php
protected $commands = [
...
\FoodKit\ReleaseNote\Commands\GenerateReleaseNote::class,
]
JIRA_USERNAME=user
JIRA_PASSWORD=secret
JIRA_URL=https://ginjath.atlassian.net
JIRA_ISSUE_REGEX=/GT-[\d]+/
```

## Usage

This command will generate the release notes between two tags.

``` sh
php artisan release-note:generate --start=v2.7.8 --end=v2.8.0
release-notes generate --start=v2.7.8 --end=v2.8.0
```

This will generate the release notes between two branches.
This will generate the release notes between two branches.

``` sh
php artisan release-note:generate --start=develop --end=master
release-notes generate --start=develop --end=master
```
16 changes: 16 additions & 0 deletions bin/release-notes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env php
<?php

if (file_exists(__DIR__.'/../../autoload.php')) {
require __DIR__.'/../../autoload.php';
} elseif (file_exists(__DIR__.'/../vendor/autoload.php')) {
require __DIR__.'/../vendor/autoload.php';
} else {
require __DIR__.'/vendor/autoload.php';
}

$application = new Symfony\Component\Console\Application('generate-release-notes', '1.0.0');
$command = new FoodKit\ReleaseNote\Commands\GenerateReleaseNoteCommand();

$application->add($command);
$application->run();
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
"email": "[email protected]"
}
],
"bin": [
"bin/release-notes"
],
"autoload": {
"psr-4": {
"FoodKit\\ReleaseNote\\": "src"
}
},
"require": {
"illuminate/console": "5.2.*",
"guzzlehttp/guzzle": "6.2.*"
"guzzlehttp/guzzle": "6.2.*",
"vlucas/phpdotenv": "^2.4",
"symfony/console": "2.8.*|3.0.*"
}
}
Loading

0 comments on commit 0c088bc

Please sign in to comment.