Skip to content

Commit e8aaf95

Browse files
authored
Include Windows build host example
1 parent 9622f33 commit e8aaf95

File tree

1 file changed

+13
-1
lines changed
  • docs/input/docs/build-server-support/build-server

1 file changed

+13
-1
lines changed

docs/input/docs/build-server-support/build-server/bamboo.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,32 @@ Title: Bamboo
55

66
If you use Bamboo then you will have to use GitVersion from the command line, as
77
there is no actively supported app. You can use the "Inject Bamboo Variables"
8-
task to read the GitVersion output back into Bamboo. Below is a Linux example
8+
task to read the GitVersion output back into Bamboo. Below are two examples
99
using the [.NET Core GitVersion global tool](https://www.nuget.org/packages/GitVersion.Tool/).
1010

1111
## Example
1212

1313
### Task: Script
1414

15+
This script can be run on a Linux build host.
16+
1517
**Script body**
1618

1719
```bash
1820
~/.dotnet/tools/dotnet-gitversion > gitversion.txt
1921
sed -i '1d;26d;s/ //;s/"//g;s/,//;s/:/=/' gitversion.txt
2022
```
2123

24+
### Task: Script
25+
26+
**Script body**
27+
28+
This script can be run on a Windows build host using Powershell.
29+
30+
```powershell
31+
(dotnet gitversion | ConvertFrom-Json).PSObject.Properties | ForEach-Object { Write-Output "$($_.Name)=$($_.Value)" } | Out-File -Encoding UTF8 -FilePath gitversion.txt
32+
```
33+
2234
### Task: Inject Bamboo variables Configuration
2335

2436
**Required Properties**

0 commit comments

Comments
 (0)