forked from SimonBrazell/privacy-redirect
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrelease.js
More file actions
19 lines (14 loc) · 656 Bytes
/
Copy pathrelease.js
File metadata and controls
19 lines (14 loc) · 656 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const fs = require('fs');
module.exports = async (markdown, metaData) => {
// Read the version from package.json
const packageData = JSON.parse(fs.readFileSync('package.json', 'utf8'));
const version = packageData.version;
// Update manifest.json with the new version
const manifestPath = 'src/manifest.json';
const manifestData = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
manifestData.version = version;
// Write the updated manifest back to the file
fs.writeFileSync(manifestPath, JSON.stringify(manifestData, null, 2));
console.log(`Updated ${manifestPath} version to ${version}`);
return markdown;
};