Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rev #3652

Merged
merged 4 commits into from
Dec 1, 2023
Merged

Fix rev #3652

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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.
Expand Down