You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can now use the `GitVersion.SemVer` environment variable in any subsequent tasks to refer to the semantic version number for your build. For example, you can build your dotnet core application with a semantic version number like so:
58
+
59
+
```yml
60
+
- task: DotNetCoreCLI@2
61
+
displayName: Build
62
+
inputs:
63
+
command: build
64
+
projects: '$(solution)'
65
+
configuration: '$(buildConfiguration)'
66
+
versioningScheme: byEnvVar
67
+
versionEnvVar: 'GitVersion.SemVer'
68
+
69
+
```
70
+
54
71
## Running inside TFS
55
72
### Using the GitVersion Variables
56
73
GitVersion passes variables in the form of `GitVersion.*` (Eg: `GitVersion.Major`) to TFS Build and also writes `GITVERSION.*` (Eg: `GITVERSION.MAJOR`) environment variables that are available for any subsequent build step.
0 commit comments