Read the current firmware version from package.json

This commit is contained in:
László Monda
2017-10-31 23:55:56 +01:00
parent 3aff28726f
commit dc82b51008

View File

@@ -1,13 +1,8 @@
#!/usr/bin/env node
const fs = require('fs');
require('shelljs/global');
const version = process.argv[2];
if (!(version)) {
echo('No version number is specified.');
exit(1);
}
const version = JSON.parse(fs.readFileSync('package.json')).version;
const releaseName = 'uhk-firmware-' + version;
const releaseDir = '/tmp/' + releaseName;
const rightFirmwareFile = '../right/build/uhk60-right_release/uhk-right.hex';