Skip to content

Commit

Permalink
Tweaked manifest "version_name" logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Jun 4, 2019
1 parent e158768 commit 1afc83e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions shells/browser/chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"name": "React Developer Tools",
"description": "Adds React debugging tools to the Chrome Developer Tools.",
"version": "4.0.0",
"version_name": "4.0.0",

"minimum_chrome_version": "49",

Expand Down
9 changes: 6 additions & 3 deletions shells/browser/shared/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,15 @@ const build = async (tempPath, manifestPath) => {
);

const commit = getGitCommit();
const versionDateString = `${commit} (${new Date().toLocaleDateString()})`;

const manifest = JSON.parse(readFileSync(copiedManifestPath).toString());
manifest.description += `\n\nCreated from revision ${commit} (${new Date().toLocaleDateString()})`;
if (tempPath.includes('chrome')) {
manifest.version_name = `${commit} (${new Date().toLocaleDateString()})`;
if (manifest.version_name) {
manifest.version_name = versionDateString;
} else {
manifest.description += `\n\nCreated from revision ${versionDateString}`;
}

writeFileSync(copiedManifestPath, JSON.stringify(manifest, null, 2));

// Pack the extension
Expand Down

0 comments on commit 1afc83e

Please sign in to comment.