Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldbarendse committed Dec 19, 2022
1 parent 78104ee commit edb2d5f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions doc/nbgv-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,44 @@ For each branch, the following properties are provided:
**Note:** When the current branch is already the release branch for the current version, no new branch will be created.
In that case, the `NewBranch` property will be `null`.

## Creating a version tag

The `tag` command automates the task of tagging a commit with a version.

To create a version tag, run:

```ps1
nbgv tag
```

This will:

1. Read version.json to ascertain the version under development, and the naming convention of tag names.
1. Create a new tag for that version.

You can optionally include a version or commit id to create a new tag for an older version/commit, e.g.:

```ps1
nbgv tag 1.0.0
```

### Customizing the behaviour of `tag`

The behaviour of the `tag` command can be customized in `version.json`:

```json
{
"version": "1.0",
"release": {
"tagName" : "v{version}"
}
}
```

| Property | Default value | Description |
|----------|---------------|-------------------------------------------------------------------------------------------------|
| tagName | `v{version}` | Defines the format of tag names. Format must include a placeholder '{version}' for the version. |

## Learn more

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.
Expand Down
1 change: 1 addition & 0 deletions doc/versionJson.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The content of the version.json file is a JSON serialized object with these prop
}
},
"release" : {
"tagName" : "v{version}",
"branchName" : "v{version}",
"versionIncrement" : "minor",
"firstUnstableTag" : "alpha"
Expand Down

0 comments on commit edb2d5f

Please sign in to comment.