diff --git a/scripts/publish-tagged-packages.mjs b/scripts/publish-tagged-packages.mjs index 728bf70e2..f9be1330e 100644 --- a/scripts/publish-tagged-packages.mjs +++ b/scripts/publish-tagged-packages.mjs @@ -84,7 +84,8 @@ async function publishPackages() { packagesToPublish.forEach(async packageName => { const packageConfig = getConfig(packageName) const {name} = packageConfig - const version = await getPackageVersion({name, tag: tag.startsWith(DEPENDABOT_TAG) ? DEPENDABOT_TAG : tag}) + const packageTag = tag.startsWith(DEPENDABOT_TAG) ? DEPENDABOT_TAG : tag + const version = await getPackageVersion({name, tag: packageTag}) // Set the new tagged version. packageConfig.version = version @@ -100,7 +101,7 @@ async function publishPackages() { fs.writeFileSync(packageJsonPath, packageJson) - await $$`npm publish --tag ${tag}` + await $$`npm publish --tag ${packageTag}` }) }