Skip to content

Commit 7dc55a7

Browse files
committed
docs(cli): Recommend long-form arguments for scripts and documentation
1 parent f00dbe6 commit 7dc55a7

4 files changed

Lines changed: 11 additions & 9 deletions

File tree

docs/input/docs/learn/dynamic-repositories.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ To tell GitVersion.exe to obtain the repository on the fly, you need to call
3232
`GitVersion.exe` with the following arguments:
3333

3434
* `--url [the url of your git repo]`
35-
* `--username [authentication username]` (or `-u`)
36-
* `--password [authentication password]` (or `-p`)
37-
* `--branch [branch name]` (or `-b`)
35+
* `--username [authentication username]` (short alias: `-u`)
36+
* `--password [authentication password]` (short alias: `-p`)
37+
* `--branch [branch name]` (short alias: `-b`)
3838
* `--commit [commit id]`
3939

40+
Long-form arguments are recommended for scripts and documentation.
41+
4042
Please note that these arguments are described when calling `GitVersion.exe --help`.
4143

4244
Also, be aware that if you don't specify the `--branch` argument (branch name) then

docs/input/docs/migration/v6-to-v7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ As a temporary migration aid, set `GITVERSION_USE_V6_ARGUMENT_PARSER=true` to re
1919
### What you need to change
2020

2121
1. Replace old argument names with POSIX-style `--long-name` arguments.
22-
2. Prefer supported short aliases where available (`-o`, `-v`, `-f`, `-c`, `-l`, `-d`, `-b`, `-u`, `-p`).
22+
2. Prefer `--long-name` arguments for readability and maintainability. Supported short aliases (`-o`, `-v`, `-f`, `-c`, `-l`, `-d`, `-b`, `-u`, `-p`) remain available for interactive use.
2323
3. Update scripts that used `-c <commit>` to `--commit <commit>`.
2424
4. Optionally use `GITVERSION_REMOTE_USERNAME` and `GITVERSION_REMOTE_PASSWORD` instead of passing credentials on the command line.
2525

docs/input/docs/usage/cli/arguments.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Description: The supported arguments of the GitVersion Command Line Interface
55
---
66

77
:::{.alert .alert-info}
8-
**Note:** GitVersion uses POSIX-style `--long-name` arguments from version 7 and up. Short aliases
8+
**Note:** GitVersion uses POSIX-style `--long-name` arguments from version 7 and up. Long-form
9+
arguments are recommended for readability in scripts and documentation. Short aliases
910
(e.g. `-l`, `-o`, `-b`) are also supported. The legacy `/switch` and `-switch`
1011
syntax is still available when `GITVERSION_USE_V6_ARGUMENT_PARSER=true` is set.
1112

docs/input/docs/usage/cli/installation.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ enter the following into a terminal:
101101
brew install gitversion
102102
```
103103

104-
Switches are available with `gitversion -h`. Even though the documentation
105-
uses a slash `/` for all switches, you need to use a dash `-` instead, since `/`
106-
is interpreted as a root path on POSIX based operating systems.
104+
Arguments are available with `gitversion --help` (short alias `-h` is also supported).
105+
Long-form arguments are recommended in scripts and documentation.
107106

108107
This should work on all operating systems supported by Homebrew (at the time
109108
of writing: Linux and macOS).
@@ -139,7 +138,7 @@ The important arguments here are:
139138
| `/repo` | The directory within the Docker container GitVersion should use as its working directory. Don't change this. |
140139

141140
:::{.alert .alert-warning}
142-
**Caveat:** The `/output buildserver` option doesn't work universally with
141+
**Caveat:** The `--output buildserver` option doesn't work universally with
143142
Docker since environment variables defined inside the Docker container will not
144143
be exposed to the host OS.
145144
:::

0 commit comments

Comments
 (0)