Skip to content

Commit 32d525d

Browse files
Release check is failing for package when only one alpha version is presenton npm (Azure#21521)
1 parent a7b6e3e commit 32d525d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

eng/scripts/Language-Settings.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ function Get-javascript-PackageInfoFromRepo ($pkgPath, $serviceDirectory) {
3838
# Returns the npm publish status of a package id and version.
3939
function IsNPMPackageVersionPublished ($pkgId, $pkgVersion) {
4040
Confirm-NodeInstallation
41-
$npmVersions = (npm show $pkgId versions)
41+
$packageAndVersion = $pkgId + "@" + $pkgVersion
42+
$npmVersion = (npm show $packageAndVersion version)
4243
if ($LastExitCode -ne 0) {
4344
npm ping
4445
if ($LastExitCode -eq 0) {
@@ -47,8 +48,7 @@ function IsNPMPackageVersionPublished ($pkgId, $pkgVersion) {
4748
Write-Host "Could not find a deployed version of $pkgId, and NPM connectivity check failed."
4849
exit(1)
4950
}
50-
$npmVersionList = $npmVersions.split(",") | ForEach-Object { return $_.replace("[", "").replace("]", "").Trim() }
51-
return $npmVersionList.Contains($pkgVersion)
51+
return $npmVersion -eq $pkgVersion
5252
}
5353

5454
# make certain to always take the package json closest to the top

0 commit comments

Comments
 (0)