Skip to content

Commit

Permalink
#4244 - remove explicit version on cli install
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Nov 12, 2024
1 parent 4a7d978 commit 58d4808
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
8 changes: 4 additions & 4 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## Supported Versions

| Version | Supported |
| --------: | :----------------: |
| 5.x | :white\_check\_mark: |
| ⋜ 5.x | :x: |
| Version | Supported |
|--------:|:--------------------:|
| 6.x | :white\_check\_mark: |
| < 6.x | :x: |

## Reporting Security Issues

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipelines:
name: Version and build
script:
- export PATH="$PATH:/root/.dotnet/tools"
- dotnet tool install --global GitVersion.Tool --version 5.*
- dotnet tool install --global GitVersion.Tool
- dotnet-gitversion /output buildserver
- source gitversion.properties
- echo Building with semver $GITVERSION_FULLSEMVER
Expand Down Expand Up @@ -61,7 +61,7 @@ pipelines:
name: Version
script:
- export PATH="$PATH:/root/.dotnet/tools"
- dotnet tool install --global GitVersion.Tool --version 5.*
- dotnet tool install --global GitVersion.Tool
- dotnet-gitversion /output buildserver
artifacts:
- gitversion.properties
Expand Down
14 changes: 10 additions & 4 deletions docs/input/docs/usage/cli/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ GitVersion can be installed as a [.NET global tool][dotnet-tool] under the name
[`GitVersion.Tool`][tool] by executing the following in a terminal:

```shell
dotnet tool install --global GitVersion.Tool --version 5.*
dotnet tool install --global GitVersion.Tool
```

:::{.alert .alert-info}
**Hint:** To install an older version of GitVersion.Tools, use the --version flag of dotnet tool install

Example: `dotnet tool install GitVersion.Tool --global --version 5.*`
:::

If you want to pin to a specific version of GitVersion, you can find the available
versions of [`GitVersion.Tool` on NuGet](https://www.nuget.org/packages/GitVersion.Tool/).

Expand Down Expand Up @@ -62,15 +68,15 @@ without installing any other dependencies. To use the Docker image, execute
the following:

```shell
docker run --rm -v "$(pwd):/repo" gittools/gitversion:5.6.6 /repo
docker run --rm -v "$(pwd):/repo" gittools/gitversion:latest-debian.12 /repo
```

The important arguments here are:

| Argument | Description |
| --------------------------: | :----------------------------------------------------------------------------------------------------------- |
|----------------------------:|:-------------------------------------------------------------------------------------------------------------|
| `"$(pwd):/repo"` | Maps the output of `pwd` (the working directory) to the `/repo` directory within the Docker container. |
| `gittools/gitversion:5.6.6` | The name and tag of the GitVersion container to use. |
| `gittools/gitversion:{tag}` | The name and tag of the GitVersion container to use. |
| `/repo` | The directory within the Docker container GitVersion should use as its working directory. Don't change this. |

:::{.alert .alert-warning}
Expand Down

0 comments on commit 58d4808

Please sign in to comment.