File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
docs/input/docs/build-server-support/build-server Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,14 @@ 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
+ The first script can be run on a Linux build host, the second script can be run on
14
+ a Windows build host using Powershell. The build only needs one of the two.
15
+
13
16
### Task: Script
14
17
15
18
** Script body**
@@ -19,6 +22,14 @@ using the [.NET Core GitVersion global tool](https://www.nuget.org/packages/GitV
19
22
sed -i ' 1d;26d;s/ //;s/"//g;s/,//;s/:/=/' gitversion.txt
20
23
```
21
24
25
+ ### Task: Script
26
+
27
+ ** Script body**
28
+
29
+ ``` powershell
30
+ (dotnet gitversion | ConvertFrom-Json).PSObject.Properties | ForEach-Object { Write-Output "$($_.Name)=$($_.Value)" } | Out-File -Encoding UTF8 -FilePath gitversion.txt
31
+ ```
32
+
22
33
### Task: Inject Bamboo variables Configuration
23
34
24
35
** Required Properties**
You can’t perform that action at this time.
0 commit comments