1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-09 08:45:55 +02:00
joplin/Tools/android-release-post-process.js
2017-12-04 18:16:14 +00:00

18 lines
505 B
JavaScript

const fs = require('fs-extra');
const toolUtils = require('./tool-utils.js');
const rnDir = __dirname + '/../ReactNativeClient';
function androidVersionNumber() {
let content = fs.readFileSync(rnDir + '/android/app/build.gradle', 'utf8');
const r = content.match(/versionName\s+"(\d+?\.\d+?\.\d+)"/)
if (r.length !== 2) throw new Error('Could not get version number');
return r[1];
}
// const
// '/android/app/build/outputs/apk/app-armeabi-v7a-release.apk'
console.info(androidVersionNumber());