Skip to content

Commit

Permalink
docs(readme): add usage gif image and improve usage section
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Cesarato committed Jan 21, 2021
1 parent fbe9fdb commit fbfdfe0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,54 +96,58 @@ return [

## 💻 Usage

> **Note:** all following commands must be run (working dir) on the root of the project or in the path where the changelog should be generated
The changelog generator will generate a log of changes from the date of the last tag to the current date,
and it will put all commit logs in the latest version just created.

The changelog generator will generate a log of changes from the date of the last tag *(if not specified with `--from-date`)* to the current date *(if not specified with `--to-date`)*,
and it will put all commit logs in the latest version just created (at the moment it doesn't generate the entire git commit version release history).
By default, will be added one to the patch semver part *(Example, if the last version is `1.0.2` the newer, if not specified the identity of the release, will be `1.0.3`)*.
![](./usage.gif)

##### To generate your changelog for your first release:

> **Note:** If the version code (`--ver`) isn't specified it will be automatically `1.0.0`
```shell
php vendor/bin/conventional-changelog --first-release
```
### Examples

#### Generate

##### To generate your changelog without committing files:
To generate your changelog *(without committing files)*

```shell
php vendor/bin/conventional-changelog
```

##### To generate your changelog with auto commit and auto version tagging:
#### Commit and tagging

To generate your changelog with auto commit and auto versioning tagging

> Note: the version code by default, will be added one to the `PATCH` semver part (`MAJOR.MINOR.PATCH+1`) of the latest git tag *(Example, if the last version is `1.0.2` the newer, if not specified the version code, will be `1.0.3`)*.
> See also `--major`, `--minor`, `--patch`, `--rc`, `--beta`, `--alpha` options.
```shell
php vendor/bin/conventional-changelog --commit
```

##### To generate your changelog from a specified date to another specified date:
#### History

To generate your changelog with the entire history of changes of all releases

> **Warn:** This operation will overwrite the `CHANGELOG.md` file if it already exists
```shell
php vendor/bin/conventional-changelog --from-date="2020-12-01" --to-date="2021-01-01"
php vendor/bin/conventional-changelog --history
```

##### To generate your changelog with a specific version code:
#### Date range

To generate your changelog from a specified date to another specified date

```shell
php vendor/bin/conventional-changelog --ver="2.0.1"
php vendor/bin/conventional-changelog --from-date="2020-12-01" --to-date="2021-01-01"
```

##### To generate your changelog with the entire history of changes of all releases:
#### Version code

> **Warn:** This operation will overwrite the `CHANGELOG.md` file if it already exists
To generate your changelog with a specific version code

```shell
php vendor/bin/conventional-changelog --history
php vendor/bin/conventional-changelog --ver="2.0.1"
```


### Commands List

> You can have more info about running `php vendor/bin/conventional-changelog --help`
Expand Down
Binary file added usage.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fbfdfe0

Please sign in to comment.