Extension: Store build type in metadata

This commit is contained in:
Romain Vigier
2022-09-08 09:51:33 +02:00
parent 4f24db17cf
commit eee013b87d
3 changed files with 5 additions and 11 deletions
+1 -1
View File
@@ -11,6 +11,6 @@ const Me = extensionUtils.getCurrentExtension();
* @param {string} msg Message to print.
*/
function message(msg) {
if ('@BUILD_TYPE@' === 'debug') // eslint-disable-line no-constant-condition
if (Me.metadata['build-type'] === 'debug')
console.log(`[${Me.metadata.name}] ${msg}`);
}
+2 -9
View File
@@ -7,21 +7,14 @@ configure_file(
configuration: {
'DNS': DNS,
'UUID': UUID,
'VERSION': meson.project_version()
},
install_dir: INSTALL_DIR
)
configure_file(
input: 'debug.js',
output: 'debug.js',
configuration: {
'VERSION': meson.project_version(),
'BUILD_TYPE': get_option('buildtype')
},
install_dir: INSTALL_DIR
)
main = [
'debug.js',
'extension.js',
'prefs.js',
'utils.js',
+2 -1
View File
@@ -7,5 +7,6 @@
"url": "https://nightthemeswitcher.romainvigier.fr",
"session-modes": ["unlock-dialog", "user"],
"shell-version": ["43"],
"version": @VERSION@
"version": @VERSION@,
"build-type": "@BUILD_TYPE@"
}