Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit a08bed8

Browse files
nikoantfacebook-github-bot
authored andcommitted
Fix changelog.md generation
Summary: Currently Flipper shows empty Changelog with only "pre-history" entry. This is because of path in generation script is wrong now. Flipper shows Changelog.md from desktop/static, so generated entries should be added there rather than to Changelog.md in the root. Reviewed By: passy Differential Revision: D21016884 fbshipit-source-id: 8709a2556374ec70bc665eaf0729bb85fd0d913f
1 parent f3bb94f commit a08bed8

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed

CHANGELOG.md

-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
# 0.37.0 (8/4/2020)
2-
3-
* D20868923 - Fix connections on Android devices with older SDKs (19)
4-
* D20822063 - The QPL plugin now shows qpl start times
5-
* D20836635 - Stabilized QPL plugin to avoid crashes with iOS devices, normalized event times to always report in milliseconds.
6-
7-
8-
# 0.36.0 (3/4/2020)
9-
10-
* D20673166 - New Hermes Debugger plugin for React Native apps.
11-
* D20789712 - Fixed error "SHA-1 for file is not computed" on 3rd party plugin compilation in dev mode (yarn start).
12-
* D20767096 - Fixed an issue where QPL points where not showing up in the marker timeline
13-
* D20724437 - Fixed applying of product attributes (title, publisher etc) to Flipper builds
14-
15-
161
# Changelog
172

183
See [desktop/static/CHANGELOG.md](desktop/static/CHANGELOG.md)

desktop/scripts/generate-changelog.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* This source code is licensed under the MIT license found in the
66
* LICENSE file in the root directory of this source tree.
77
*
8-
* @noformat
8+
* @format
99
*/
1010

1111
/**
@@ -19,26 +19,29 @@ const cp = require('child_process');
1919

2020
const desktopRoot = path.resolve(__dirname, '..');
2121
const root = path.resolve(desktopRoot, '..');
22+
const staticDir = path.join(desktopRoot, 'static');
2223

23-
const version = JSON.parse(fs.readFileSync(path.join(desktopRoot, 'package.json'), 'utf8')).version;
24+
const version = JSON.parse(
25+
fs.readFileSync(path.join(desktopRoot, 'package.json'), 'utf8'),
26+
).version;
2427

2528
const now = new Date();
2629
const date = `${now.getDate()}/${now.getMonth() + 1}/${now.getFullYear()}`;
2730
const newlineMarker = '__NEWLINE_MARKER__';
28-
const fChangelog = path.resolve(root, 'CHANGELOG.md');
31+
const fChangelog = path.resolve(staticDir, 'CHANGELOG.md');
2932

3033
const lastCommit = cp
3134
.execSync(`hg log --limit 1 --template '{node}'`, {cwd: root})
3235
.toString();
3336
const firstCommit = cp
3437
.execSync(
3538
`hg log --limit 1 --template '{node}' --keyword 'Flipper Release: v'`,
36-
{cwd: root}
39+
{cwd: root},
3740
)
3841
.toString();
3942

4043
console.log(
41-
`Generating changelog for version ${version} based on ${firstCommit}..${lastCommit}`
44+
`Generating changelog for version ${version} based on ${firstCommit}..${lastCommit}`,
4245
);
4346

4447
// # get all commit summaries since last release | find all changelog entries, but make sure there is only one line per commit by temporarily replacing newlines

desktop/static/CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# 0.37.0 (8/4/2020)
2+
3+
* D20868923 - Fix connections on Android devices with older SDKs (19)
4+
* D20822063 - The QPL plugin now shows qpl start times
5+
* D20836635 - Stabilized QPL plugin to avoid crashes with iOS devices, normalized event times to always report in milliseconds.
6+
7+
8+
# 0.36.0 (3/4/2020)
9+
10+
* D20673166 - New Hermes Debugger plugin for React Native apps.
11+
* D20789712 - Fixed error "SHA-1 for file is not computed" on 3rd party plugin compilation in dev mode (yarn start).
12+
* D20767096 - Fixed an issue where QPL points where not showing up in the marker timeline
13+
* D20724437 - Fixed applying of product attributes (title, publisher etc) to Flipper builds
14+
15+
116
# Pre-history
217

318
Please see our [releases GitHub page](https://github.com/facebook/flipper/releases) for a full list of changes of old releases.

0 commit comments

Comments
 (0)