-
-
Notifications
You must be signed in to change notification settings - Fork 177
Closed
Description
I am currently experimenting with Nerdbank.GitVersioning for use in a monorepo for which we want to follow the GitHub Flow branching strategy. As part of the testing, I have a version.json at the root level of the repository, as follows:
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"nugetPackageVersion": {
"semVer": 2
},
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/tags/v\\d+(?:\\.\\d+)?$"
],
"cloudBuild": {
"setVersionVariables": true,
"buildNumber": {
"enabled": true
}
}
}For one of the components in the monorepo (located in a folder below the root), I have another version.json:
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"inherit": true,
"version": "1.3.0-alpha",
"pathFilters": ["."],
"release" : {
"tagName" : "telemetry-v{version}",
"branchName" : "telemetry-v{version}",
"versionIncrement" : "minor",
"firstUnstableTag" : "alpha"
}
}
When I ran the command nbgv prepare-release --project . --format json, the component's version.json file was updated as below:
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.3.0",
"nuGetPackageVersion": {
"semVer": 2.0
},
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/tags/v\\d+(?:\\.\\d+)?$"
],
"cloudBuild": {
"buildNumber": {
"enabled": true
}
},
"release": {
"tagName": "telemetry-v{version}",
"branchName": "telemetry-v{version}"
},
"pathFilters": [
"./"
]
}
I was expecting the change to the version, but the change of structure, and the fact that it no longer inherits from the root version.json file was a surprise. Is this expected behavior? If so, how would the inherit flag make any sense to use?
Metadata
Metadata
Assignees
Labels
No labels