Skip to content

Commit 75b0ee6

Browse files
authored
Docs: restructure and enhance the usage section (#12)
* Docs: restructure and enhance the usage section * Docs: fix wrong header size * Docs: update recover mode
1 parent a529f87 commit 75b0ee6

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ $ yarn add global semantic-git-release-cli
2828

2929
## Usage
3030

31+
- [Release a new version](#release-a-new-version)
32+
- [Recover the complete changelog](#recover-the-complete-changelog)
33+
34+
### Release a new version
35+
36+
If you start using `semantic-git-release-cli` with a brand new project simply start in this section.
37+
38+
If you already released some verions of your project, you might consider to [recover the complete changelog first](#recover-the-complete-changelog).
39+
3140
Forget the times when you had to manually write changelogs, update versions, tag commits. Now just type:
3241

3342
```sh
@@ -40,7 +49,7 @@ or if you already have an alias for sgr, use following instead:
4049
$ semantic-git-release
4150
```
4251

43-
## Tasks
52+
#### Tasks
4453

4554
So there are a few tasks `semantic-git-release-cli` will do for you:
4655

@@ -50,13 +59,15 @@ So there are a few tasks `semantic-git-release-cli` will do for you:
5059
- creates or updates the `CHANGELOG.md`
5160
- commits and tags the new `version`
5261

53-
## Recover the CHANGELOG.md
62+
### Recover the complete changelog
5463

5564
If you are start to use `semantic-git-release-cli` but already released (and tagged) versions. Simply use the recover mode.
5665

66+
If `--recover` is set to `backup` it will generate a backup file of your current `CHANGELOG.md` inside of the `.sgr_backup` directory, which gets generated the first time you use this command inside of your current working directory.
67+
5768
```sh
58-
# generates the complete CHANGELOG.md
59-
sgr --recover # or short `sgr -r`
60-
# generates the complete CHANGELOG.md and creates a backup of the current CHANGELOG.md in .sgr_backup
61-
sgr -r backup # or short `sgr -r b`
69+
# generates the complete CHANGELOG.md without backup
70+
$ sgr --recover # or short `sgr -r`
71+
# generates the complete CHANGELOG.md with backup
72+
$ sgr --recover backup # or short `sgr -r b`
6273
```

0 commit comments

Comments
 (0)