Skip to content

Commit f2418cf

Browse files
committed
Add nbgv tool to cloud runtime test
1 parent b946a2d commit f2418cf

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,7 @@ jobs:
138138
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true))
139139
pool:
140140
vmImage: macOS 10.13
141+
variables:
142+
DOTNET_ROOT: /Users/vsts/.dotnet
141143
steps:
142144
- template: azure-pipelines/xplattest-pipeline.yml

azure-pipelines/xplattest-pipeline.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ steps:
1111
downloadPath: $(System.DefaultWorkingDirectory)
1212

1313
- task: Bash@3
14-
displayName: Consume NB.GV from .NET Core build
14+
displayName: Set up git username and email address
1515
inputs:
16-
failOnStderr: true
1716
targetType: inline
18-
script: >
17+
script: |
1918
git config --global user.name ci
20-
2119
git config --global user.email [email protected]
2220
21+
- task: Bash@3
22+
displayName: Consume NB.GV from .NET Core build
23+
inputs:
24+
failOnStderr: true
25+
targetType: inline
26+
script: >
2327
PkgFileName=$(ls deployables/Nerdbank.GitVersioning.*nupkg)
2428
2529
NBGV_NuGetPackageVersion=$([[ $PkgFileName =~ Nerdbank.GitVersioning\.(.*)\.nupkg ]] && echo "${BASH_REMATCH[1]}")
@@ -34,3 +38,19 @@ steps:
3438
git commit -m "Initial commit" &&
3539
dotnet pack -c debug &&
3640
if ! ls bin/debug/lib.42.42.1*.nupkg 1> /dev/null 2>&1; then exit 1; fi
41+
42+
- task: Bash@3
43+
displayName: Use nbgv dotnet CLI tool
44+
inputs:
45+
failOnStderr: true
46+
targetType: inline
47+
script: >
48+
echo DOTNET_ROOT=$DOTNET_ROOT
49+
50+
PkgFileName=$(ls deployables/Nerdbank.GitVersioning.*nupkg)
51+
52+
NBGV_NuGetPackageVersion=$([[ $PkgFileName =~ Nerdbank.GitVersioning\.(.*)\.nupkg ]] && echo "${BASH_REMATCH[1]}")
53+
54+
dotnet tool install nbgv --tool-path . --version $NBGV_NuGetPackageVersion --add-source deployables &&
55+
./nbgv get-version -f json -p lib &&
56+
./nbgv get-version -f json -p lib | grep 42.42.1

0 commit comments

Comments
 (0)