1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-16 12:55:14 +03:00
* Fix rev

* Remove COMMITHASH

* Use manifest for Android too

* Fix copy pasta
This commit is contained in:
Mark Haslinghuis 2023-12-01 19:58:32 +01:00 committed by GitHub
parent 66bc1898ca
commit ec0ceb6911
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -50,7 +50,7 @@ function useGlobalNodeFunctions() {
}
function readConfiguratorVersionMetadata() {
if (GUI.isNWJS()) {
if (GUI.isNWJS() || GUI.isCordova()) {
const manifest = chrome.runtime.getManifest();
CONFIGURATOR.productName = manifest.productName;
CONFIGURATOR.version = manifest.version;

View file

@ -5,8 +5,9 @@ import path from "node:path";
import { readFileSync } from "node:fs";
import copy from "rollup-plugin-copy";
import pkg from './package.json';
import * as child from 'child_process';
const childProcess = require('child_process');
const commitHash = child.execSync('git rev-parse --short HEAD').toString();
function serveFileFromDirectory(directory) {
return (req, res, next) => {
@ -52,7 +53,7 @@ export default defineConfig({
define: {
'__APP_VERSION__': JSON.stringify(pkg.version),
'__APP_PRODUCTNAME__': JSON.stringify(pkg.productName),
'__APP_REVISION__': JSON.stringify(childProcess.execSync("git rev-parse --short HEAD").toString().trim()),
'__APP_REVISION__': JSON.stringify(commitHash),
},
test: {
// NOTE: this is a replacement location for karma tests.