Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions manifest.template.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const pkg = require('./package.json');

module.exports = (env) => {
const firefox = env === 'firefox';
return {
manifest_version: 3,
name: 'Discogs Enhancer',
short_name: 'Discogs Enhancer',
description: 'Enhance your Discogs experience with dark themes, seller tools, price comparisons, currency conversion, powerful filters, and more!',
version: '3.10.2',
version: pkg.version,
author: 'Matthew Salcido',
homepage_url: 'https://www.discogs-enhancer.com',
action: {
Expand Down Expand Up @@ -58,7 +60,6 @@ module.exports = (env) => {
browser_specific_settings: {
gecko: {
id: '{190dbc44-5dee-4ad4-86e9-a38d7a2d1c61}',
strict_min_version: '101.0'
},
},
host_permissions: [
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"build:chrome": "NODE_ENV=production PLATFORM=chrome webpack --progress",
"build:firefox": "NODE_ENV=production PLATFORM=firefox webpack --progress",
"build": "npm-run-all build:chrome build:firefox",
"watch:chrome": "NODE_ENV=development PLATFORM=chrome webpack --watch --progress",
"watch:firefox": "NODE_ENV=development PLATFORM=firefox webpack --watch --progress",
"watch": "npm-run-all --parallel watch:chrome watch:firefox",
Expand Down
24 changes: 13 additions & 11 deletions version-bump.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

const fs = require('fs');
const path = require('path');

// new version number {string}
const newVersion = process.argv[2];
Expand All @@ -35,21 +36,22 @@ const newVersion = process.argv[2];
*/
function updateJSONfiles(version) {

let files = [
'./chrome-dist/manifest.json',
'./firefox-dist/manifest.json',
'package.json',
'package-lock.json'
];
let files = ['package.json', 'package-lock.json'];

files.forEach(file => {
files.forEach((file) => {

let data = JSON.parse(fs.readFileSync(file));
let filePath = path.resolve(__dirname, file);

if (!fs.existsSync(filePath)) {
console.warn(`⚠️ Skipped ${file}, not found.`);
return;
}

let data = JSON.parse(fs.readFileSync(filePath, 'utf-8'));

data.version = version;
fs.writeFileSync(file, JSON.stringify(data, null, 2));
// add new line to end of file
fs.appendFileSync(file, '\n');

fs.writeFileSync(filePath, JSON.stringify(data, null, 2) + '\n');

console.log(`✅ Updated ${file} to ${version}.`);
});
Expand Down
Loading