set version

pull/1283/head
antelle 2019-09-09 17:09:42 +02:00
parent 574fa84f7d
commit 09894d1c8f
2 changed files with 22 additions and 21 deletions

View File

@ -1,22 +1,22 @@
{
"name": "KeeWeb",
"version": "1.10.0",
"description": "Free cross-platform password manager compatible with KeePass",
"main": "main.js",
"homepage": "https://keeweb.info",
"repository": {
"type": "git",
"url": "https://github.com/keeweb/keeweb"
},
"author": {
"name": "Antelle",
"email": "antelle.net@gmail.com",
"url": "http://antelle.net"
},
"license": "MIT",
"readme": "../README.md",
"dependencies": {
"node-stream-zip": "^1.4.2"
},
"devDependencies": {}
"name": "KeeWeb",
"version": "1.10.0",
"description": "Free cross-platform password manager compatible with KeePass",
"main": "main.js",
"homepage": "https://keeweb.info",
"repository": {
"type": "git",
"url": "https://github.com/keeweb/keeweb"
},
"author": {
"name": "Antelle",
"email": "antelle.net@gmail.com",
"url": "http://antelle.net"
},
"license": "MIT",
"readme": "../README.md",
"dependencies": {
"node-stream-zip": "^1.4.2"
},
"devDependencies": {}
}

View File

@ -27,6 +27,7 @@ function processFile(name) {
throw new Error('No match found!');
}
data.version = version;
const newContent = JSON.stringify(data, null, 4) + '\n';
const numSpaces = name.endsWith('package-lock.json') ? 2 : 4;
const newContent = JSON.stringify(data, null, numSpaces) + '\n';
fs.writeFileSync(name, newContent, 'utf8');
}