1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Tools: Fixed Android version handling

This commit is contained in:
Laurent Cozic 2020-09-12 00:10:18 +01:00
parent c95d7f9d37
commit af8845f209

View File

@ -35,7 +35,7 @@ function increaseGradleVersionCode(content) {
function increaseGradleVersionName(content) { function increaseGradleVersionName(content) {
const newContent = content.replace(/(versionName\s+"\d+?\.\d+?\.)(\d+)"/, function(match, prefix, buildNum) { const newContent = content.replace(/(versionName\s+"\d+?\.\d+?\.)(\d+)"/, function(match, prefix, buildNum) {
const n = Number(buildNum); const n = Number(buildNum);
if (isNaN(n) || !n) throw new Error(`Invalid version code: ${buildNum}`); if (isNaN(n)) throw new Error(`Invalid version code: ${buildNum}`);
return `${prefix + (n + 1)}"`; return `${prefix + (n + 1)}"`;
}); });