Up version to 0.39.0 & prepare pre-release script (#1144)

This commit is contained in:
Jinbo Wang 2022-03-28 15:42:18 +08:00 committed by GitHub
parent 6d32418be4
commit 90538eae11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "vscode-java-debug",
"version": "0.38.0",
"version": "0.39.0",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@ -2,7 +2,7 @@
"name": "vscode-java-debug",
"displayName": "Debugger for Java",
"description": "A lightweight Java debugger for Visual Studio Code",
"version": "0.38.0",
"version": "0.39.0",
"publisher": "vscjava",
"preview": true,
"aiKey": "67d4461e-ccba-418e-8082-1bd0acfe8516",
@ -54,7 +54,7 @@
}
],
"javaExtensions": [
"./server/com.microsoft.java.debug.plugin-0.35.0.jar"
"./server/com.microsoft.java.debug.plugin-0.36.0.jar"
],
"commands": [
{

View File

@ -0,0 +1,25 @@
const fs = require("fs");
const json = JSON.parse(fs.readFileSync("./package.json").toString());
const stableVersion = json.version.match(/(\d+)\.(\d+)\.(\d+)/);
const major = stableVersion[1];
const minor = stableVersion[2];
function prependZero(number) {
if (number > 99) {
throw "Unexpected value to prepend with zero";
}
return `${number < 10 ? "0" : ""}${number}`;
}
const date = new Date();
const month = date.getMonth() + 1;
const day = date.getDate();
const hours = date.getHours();
patch = `${date.getFullYear()}${prependZero(month)}${prependZero(day)}${prependZero(hours)}`;
const insiderPackageJson = Object.assign(json, {
version: `${major}.${minor}.${patch}`,
});
fs.writeFileSync("./package.json", JSON.stringify(insiderPackageJson, null, 2));