Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker documentation (v6) #3858

Merged
merged 4 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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