Skip to content

Commit

Permalink
Merge pull request #3858 from asbjornu/feature/docker-docs
Browse files Browse the repository at this point in the history
Docker documentation (v6)
  • Loading branch information
arturcic authored Dec 31, 2023
2 parents 9e3e1c2 + 1ee1193 commit 0df218e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.ps1
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/pwsh
#!/usr/bin/env pwsh
<#
.PARAMETER Stage
The build stage to execute.
Expand Down
27 changes: 27 additions & 0 deletions docs/input/docs/usage/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
Order: 50
Title: Docker
Description: |
Use GitVersion through one of its many published Docker containers.
---

GitVersion can be used through one of its many published Docker
containers. The list of available containers can be found on
[Docker Hub][docker-hub]. Once you've found the image you want to use,
you can run it like this:

```shell
docker run --rm --volume "$(pwd):/repo" gittools/gitversion:6.0.0-fedora.36-6.0 /repo
```

The above command will run GitVersion with the current directory
mapped to `/repo` inside the container (the `--volume "$(pwd):/repo"`
part). The `/repo` directory is then passed in as the argument
GitVersion should use to calculate the version.

The `--rm` flag will remove the container after it has finished
running.

[Explore GitVersion on Docker Hub][docker-hub]{.btn .btn-primary}

[docker-hub]: https://hub.docker.com/r/gittools/gitversion
6 changes: 3 additions & 3 deletions docs/input/docs/usage/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ patch releases, it's a useful option to some.

:::{.alert .alert-warning}
**Warning**

We are not semantically versioning this library and it should be considered
unstable.
The library API is not stable and does not follow the semantic versioning
of the GitVersion tool. A patch release of the tool may break the library
and we will refactor and change the library API without notice.
:::

<a href="/api" class="btn btn-primary">Explore the GitVersion library API</a>
15 changes: 11 additions & 4 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,35 @@ expected.

## Serving the documentation locally

To serve up the documentation locally, you need to run the script
To serve up the documentation locally, you need to run the following
commands:

```shell
./build.ps1 -Stage build -Target PrepareBuild
./build.ps1 -Stage build -Target Build
./build.ps1 -Stage docs -Target PreviewDocs
```

### On Windows

On Windows, you need to run the following build command in a PowerShell
On Windows, you need to run the following commands in a PowerShell
terminal:

```shell
./build.ps1 -Stage build -Target PrepareBuild
./build.ps1 -Stage build -Target Build
./build.ps1 -Stage docs -Target PreviewDocs
```

### On Unix

First you need to [install PowerShell on macOS][ps-mac] or [Linux][ps-linux],
then execute the following command:
then execute the following commands:

```shell
pwsh ./build.ps1 -Stage docs -Target PreviewDocs
./build.ps1 -Stage build -Target PrepareBuild
./build.ps1 -Stage build -Target Build
./build.ps1 -Stage docs -Target PreviewDocs
```

After pressing enter, the documentation will be generated and then served under
Expand Down

0 comments on commit 0df218e

Please sign in to comment.