File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
docs/input/docs/build-server-support/build-server Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -5,20 +5,32 @@ Title: Bamboo
5
5
6
6
If you use Bamboo then you will have to use GitVersion from the command line, as
7
7
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
9
9
using the [ .NET Core GitVersion global tool] ( https://www.nuget.org/packages/GitVersion.Tool/ ) .
10
10
11
11
## Example
12
12
13
13
### Task: Script
14
14
15
+ This script can be run on a Linux build host.
16
+
15
17
** Script body**
16
18
17
19
``` bash
18
20
~ /.dotnet/tools/dotnet-gitversion > gitversion.txt
19
21
sed -i ' 1d;26d;s/ //;s/"//g;s/,//;s/:/=/' gitversion.txt
20
22
```
21
23
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
+
22
34
### Task: Inject Bamboo variables Configuration
23
35
24
36
** Required Properties**
You can’t perform that action at this time.
0 commit comments