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
55
66If you use Bamboo then you will have to use GitVersion from the command line, as
77there 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
99using the [ .NET Core GitVersion global tool] ( https://www.nuget.org/packages/GitVersion.Tool/ ) .
1010
1111## Example
1212
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+
1316### Task: Script
1417
1518** Script body**
@@ -19,6 +22,14 @@ using the [.NET Core GitVersion global tool](https://www.nuget.org/packages/GitV
1922sed -i ' 1d;26d;s/ //;s/"//g;s/,//;s/:/=/' gitversion.txt
2023```
2124
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+
2233### Task: Inject Bamboo variables Configuration
2334
2435** Required Properties**
You can’t perform that action at this time.
0 commit comments