From 51e99053bd066d1d2352ec3db9aafff9e8722486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Ulsberg?= Date: Fri, 29 Dec 2023 21:19:10 +0100 Subject: [PATCH 1/4] Clarify library API stability --- docs/input/docs/usage/library.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/input/docs/usage/library.md b/docs/input/docs/usage/library.md index cec061ecdb..0eaeb6a481 100644 --- a/docs/input/docs/usage/library.md +++ b/docs/input/docs/usage/library.md @@ -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. ::: Explore the GitVersion library API From f5ada0e589f30e7ba0d607009ea0809be30e8cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Ulsberg?= Date: Fri, 29 Dec 2023 21:27:29 +0100 Subject: [PATCH 2/4] Make build.ps1 executable Make build.ps1 executable (chmod +x) and execute using `/usr/bin/env` so the `PATH` is taken into consideration when finding the `pwsh` binary. --- build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 build.ps1 diff --git a/build.ps1 b/build.ps1 old mode 100644 new mode 100755 index 6c85e9e8c9..0962436bef --- a/build.ps1 +++ b/build.ps1 @@ -1,4 +1,4 @@ -#!/usr/bin/pwsh +#!/usr/bin/env pwsh <# .PARAMETER Stage The build stage to execute. From 8746750c6ac3af732d6b47d88465612cc12115c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Ulsberg?= Date: Fri, 29 Dec 2023 23:26:34 +0100 Subject: [PATCH 3/4] Update commands needed to build docs --- docs/readme.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/readme.md b/docs/readme.md index 623134a144..6d89c8deaf 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -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 From 1ee119352f4cb37820a163a5ae2408450fa1f864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Ulsberg?= Date: Fri, 29 Dec 2023 23:26:48 +0100 Subject: [PATCH 4/4] Add documentation for Docker usage --- docs/input/docs/usage/docker.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/input/docs/usage/docker.md diff --git a/docs/input/docs/usage/docker.md b/docs/input/docs/usage/docker.md new file mode 100644 index 0000000000..5d70058ce1 --- /dev/null +++ b/docs/input/docs/usage/docker.md @@ -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