Show FB-internal announcements only in internal changelog (#1544)

Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1544

Added Facebook changelog file

Reviewed By: nikoant

Differential Revision: D23930322

fbshipit-source-id: bb6be359d36188f142d342604e50010170086610
This commit is contained in:
Anna Murawska
2020-09-28 02:40:40 -07:00
committed by Facebook GitHub Bot
parent 95ae7a8bce
commit 5e979403a0
3 changed files with 35 additions and 3 deletions

View File

@@ -10,6 +10,7 @@
import path from 'path';
import fs from 'fs';
import {remote} from 'electron';
import config from '../fb-stubs/config';
let _staticPath = '';
@@ -29,3 +30,23 @@ export function getStaticPath() {
}
return _staticPath;
}
export function getChangelogPath() {
const staticPath = getStaticPath();
let changelogPath = '';
if (config.isFBBuild) {
changelogPath = path.resolve(staticPath, 'facebook');
} else {
changelogPath = staticPath;
}
if (fs.existsSync(changelogPath)) {
return changelogPath;
}
if (!fs.existsSync(changelogPath)) {
throw new Error('Changelog path path does not exist: ' + changelogPath);
}
return changelogPath;
}