Tweaked manifest "version_name" logic
Brian Vaughn committed
Jun 4, 2019 at 14:56 UTC
1afc83e7cde6315853cfcca3f80d8025acc0a155
2 files changed
+7
-3
shells/browser/chrome/manifest.json
+1
@@ -3,6 +3,7 @@
3
"name": "React Developer Tools",
4
"description": "Adds React debugging tools to the Chrome Developer Tools.",
5
"version": "4.0.0",
6
+ "version_name": "4.0.0",
7
8
"minimum_chrome_version": "49",
9
shells/browser/shared/build.js
+6
-3
@@ -60,12 +60,15 @@ const build = async (tempPath, manifestPath) => {
60
);
61
62
const commit = getGitCommit();
63
+ const versionDateString = `${commit} (${new Date().toLocaleDateString()})`;
64
65
const manifest = JSON.parse(readFileSync(copiedManifestPath).toString());
65
- manifest.description += `\n\nCreated from revision ${commit} (${new Date().toLocaleDateString()})`;
66
- if (tempPath.includes('chrome')) {
67
- manifest.version_name = `${commit} (${new Date().toLocaleDateString()})`;
66
+ if (manifest.version_name) {
67
+ manifest.version_name = versionDateString;
68
+ } else {
69
+ manifest.description += `\n\nCreated from revision ${versionDateString}`;
70
}
71
+
72
writeFileSync(copiedManifestPath, JSON.stringify(manifest, null, 2));
73
74
// Pack the extension