Skip to content

Commit edb2d5f

Browse files
Update documentation
1 parent 78104ee commit edb2d5f

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

doc/nbgv-cli.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,44 @@ For each branch, the following properties are provided:
164164
**Note:** When the current branch is already the release branch for the current version, no new branch will be created.
165165
In that case, the `NewBranch` property will be `null`.
166166

167+
## Creating a version tag
168+
169+
The `tag` command automates the task of tagging a commit with a version.
170+
171+
To create a version tag, run:
172+
173+
```ps1
174+
nbgv tag
175+
```
176+
177+
This will:
178+
179+
1. Read version.json to ascertain the version under development, and the naming convention of tag names.
180+
1. Create a new tag for that version.
181+
182+
You can optionally include a version or commit id to create a new tag for an older version/commit, e.g.:
183+
184+
```ps1
185+
nbgv tag 1.0.0
186+
```
187+
188+
### Customizing the behaviour of `tag`
189+
190+
The behaviour of the `tag` command can be customized in `version.json`:
191+
192+
```json
193+
{
194+
"version": "1.0",
195+
"release": {
196+
"tagName" : "v{version}"
197+
}
198+
}
199+
```
200+
201+
| Property | Default value | Description |
202+
|----------|---------------|-------------------------------------------------------------------------------------------------|
203+
| tagName | `v{version}` | Defines the format of tag names. Format must include a placeholder '{version}' for the version. |
204+
167205
## Learn more
168206

169207
There are several more sub-commands and switches to each to help you build and maintain your projects, find a commit that built a particular version later on, create tags, etc.

doc/versionJson.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The content of the version.json file is a JSON serialized object with these prop
5959
}
6060
},
6161
"release" : {
62+
"tagName" : "v{version}",
6263
"branchName" : "v{version}",
6364
"versionIncrement" : "minor",
6465
"firstUnstableTag" : "alpha"

0 commit comments

Comments
 (0)