Skip to content
Snippets Groups Projects
Commit bbb2bede authored by mathias.chouet's avatar mathias.chouet
Browse files

Improved cordova script for correct naming of generated apk

parent 3b18c1d0
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,13 @@
const fs = require('fs');
const oldPath = "platforms/android/app/build/outputs/apk/debug/app-debug.apk";
const newPath = "release/cassiopee.apk";
let version = require('child_process').execSync('git describe --abbrev=0').toString().trim();
if (version !== "") {
version = "-" + version;
}
const newPath = "release/cassiopee" + version + ".apk";
if (fs.existsSync(oldPath)) {
fs.renameSync(oldPath, newPath);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment