@@ -111,18 +111,13 @@ function GetPackageInfoJson ($packageInfoJsonLocation) {
111
111
112
112
$packageInfoJson = Get-Content $packageInfoJsonLocation - Raw
113
113
$packageInfo = ConvertFrom-Json $packageInfoJson
114
+ if ($GetDocsMsDevLanguageSpecificPackageInfoFn -and (Test-Path " Function:$GetDocsMsDevLanguageSpecificPackageInfoFn " )) {
115
+ $packageInfo = & $GetDocsMsDevLanguageSpecificPackageInfoFn $packageInfo $PackageSourceOverride
116
+ }
117
+ # Default: use the dev version from package info as the version for
118
+ # downstream processes
114
119
if ($packageInfo.DevVersion ) {
115
- # If the package is of a dev version there may be language-specific needs to
116
- # specify the appropriate version. For example, in the case of JS, the dev
117
- # version is always 'dev' when interacting with NPM.
118
- if ($GetDocsMsDevLanguageSpecificPackageInfoFn -and (Test-Path " Function:$GetDocsMsDevLanguageSpecificPackageInfoFn " )) {
119
- $packageInfo = & $GetDocsMsDevLanguageSpecificPackageInfoFn $packageInfo
120
- }
121
- else {
122
- # Default: use the dev version from package info as the version for
123
- # downstream processes
124
- $packageInfo.Version = $packageInfo.DevVersion
125
- }
120
+ $packageInfo.Version = $packageInfo.DevVersion
126
121
}
127
122
return $packageInfo
128
123
}
@@ -202,7 +197,7 @@ foreach ($packageInfoLocation in $PackageInfoJsonLocations) {
202
197
Write-Host " Validating the packages..."
203
198
204
199
$packageInfo = GetPackageInfoJson $packageInfoLocation
205
- # This calls a function named "Validate-${Language}-DocMsPackages"
200
+ # This calls a function named "Validate-${Language}-DocMsPackages"
206
201
# declared in common.ps1, implemented in Language-Settings.ps1
207
202
$isValid = & $ValidateDocsMsPackagesFn `
208
203
- PackageInfos $packageInfo `
@@ -214,7 +209,7 @@ foreach ($packageInfoLocation in $PackageInfoJsonLocations) {
214
209
Write-Host " Package validation failed for package: $packageInfoLocation "
215
210
$allSucceeded = $false
216
211
217
- # Skip the later call to UpdateDocsMsMetadataForPackage because this
212
+ # Skip the later call to UpdateDocsMsMetadataForPackage because this
218
213
# package has not passed validation
219
214
continue
220
215
}
@@ -229,6 +224,6 @@ foreach ($packageInfoLocation in $PackageInfoJsonLocations) {
229
224
# any packages failed validation
230
225
if ($allSucceeded ) {
231
226
Write-Host " ##vso[task.setvariable variable=DocsMsPackagesAllValid;]$true "
232
- } else {
227
+ } else {
233
228
Write-Host " ##vso[task.setvariable variable=DocsMsPackagesAllValid;]$false "
234
229
}
0 commit comments