We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ac1bb8 commit 29f175cCopy full SHA for 29f175c
utils/bump/bump-utils.mjs
@@ -31,7 +31,7 @@ export function bumpDateVer({ filePath, verbose = true } = {}) { // bumps YYYY.M
31
const fileContent = fs.readFileSync(filePath, 'utf-8'),
32
oldVer = fileContent.match(/(?:@version|"version"):?\s*"?([\d.]+)"?/)?.[1]
33
if (!oldVer) return this.log.info(`No version found in ${filePath}`)
34
- const date = new Date(), today = `${date.getFullYear()}.${date.getMonth() + 1}.${date.getDate()}`
+ const date = new Date(), today = `${date.getFullYear()}.${ date.getMonth() +1 }.${date.getDate()}`
35
const newVer = oldVer == today ? `${today}.1` // bump sub-ver to 1
36
: oldVer.startsWith(`${today}.`) ? // bump sub-ver to 2+
37
`${today}.${ parseInt(oldVer.split('.').pop()) +1 }`
0 commit comments