Skip to content

Commit 37d8784

Browse files
committed
chore: fix invalid pre-release version
[skip ci]
1 parent 67cd9a3 commit 37d8784

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
console.log(Math.floor(Date.now() / 10000))
1+
console.log(Math.floor(Date.now() / 1000))

infra/release/src/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ export const createPreReleaseVer = (version: string) => {
1313
if (!patchNumber) {
1414
throw new Error('VSCODE_WDIO_PRE_RELEASE_PATCH_NUMBER is not set. Please check the environment variables.')
1515
}
16-
const [major, minor, patch] = version.split('.')
17-
const newVersion = [major, minor]
18-
newVersion.push(`${patch.split('-')[0]}${patchNumber}`.slice(0, 9))
16+
const newVersion = version.split('.').slice(0, 2)
17+
newVersion.push(patchNumber)
1918
return `${newVersion.join('.')}`
2019
}

0 commit comments

Comments
 (0)