Skip to content

Commit 4718480

Browse files
committed
allow the script to be run on files that already have short names
1 parent 2aadc46 commit 4718480

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

script/content-migrations/use-short-versions.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ async function main () {
5959
.replace(/>=?2\.19/, '*')
6060

6161
// Find the relevant version from the master list so we can access the short name.
62-
const versionObj = allVersions.find(version => version.plan === plan)
62+
const versionObj = allVersions.find(version => version.plan === plan || version.shortName === plan)
63+
if (!versionObj) {
64+
console.error(`can't find supported version for ${plan}`)
65+
process.exit(1)
66+
}
6367
delete data.versions[plan]
6468
data.versions[versionObj.shortName] = valueToUse
6569
})

0 commit comments

Comments
 (0)