chore: update next-version to handle using the next bump package.json… (#25599)

Co-authored-by: Bill Glesias <bglesias@gmail.com>
This commit is contained in:
Emily Rohrbough
2023-01-27 15:50:21 -06:00
committed by GitHub
parent b50714108d
commit 52e9dbc100
11 changed files with 254 additions and 59 deletions
+3 -3
View File
@@ -33,14 +33,14 @@ const clear = () => {
const prune = () => {
const cacheDir = state.getCacheDir()
const currentVersion = util.pkgVersion()
const checkedInBinaryVersion = util.pkgVersion()
let deletedBinary = false
return fs.readdirAsync(cacheDir)
.then((versions) => {
return Bluebird.all(versions.map((version) => {
if (version !== currentVersion) {
if (version !== checkedInBinaryVersion) {
deletedBinary = true
const versionDir = join(cacheDir, version)
@@ -51,7 +51,7 @@ const prune = () => {
})
.then(() => {
if (deletedBinary) {
logger.always(`Deleted all binary caches except for the ${currentVersion} binary cache.`)
logger.always(`Deleted all binary caches except for the ${checkedInBinaryVersion} binary cache.`)
} else {
logger.always(`No binary caches found to prune.`)
}