From 7e84d3a2c1cb4311370c1068fcacb4e5f2d9dd42 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 10 Aug 2020 18:56:54 -0500 Subject: [PATCH] build: in release notes script, do not assume electron dirname (#24927) --- script/release/notes/notes.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/script/release/notes/notes.js b/script/release/notes/notes.js index 0daa26b3fbb2..2ad4d822eca5 100644 --- a/script/release/notes/notes.js +++ b/script/release/notes/notes.js @@ -11,7 +11,7 @@ const octokit = new Octokit({ auth: process.env.ELECTRON_GITHUB_TOKEN }); -const { SRC_DIR } = require('../../lib/utils'); +const { ELECTRON_DIR } = require('../../lib/utils'); const MAX_FAIL_COUNT = 3; const CHECK_INTERVAL = 5000; @@ -387,13 +387,12 @@ const getNotes = async (fromRef, toRef, newVersion) => { } const pool = new Pool(); - const electronDir = path.resolve(SRC_DIR, 'electron'); - const toBranch = await getBranchNameOfRef(toRef, electronDir); + const toBranch = await getBranchNameOfRef(toRef, ELECTRON_DIR); console.log(`Generating release notes between ${fromRef} and ${toRef} for version ${newVersion} in branch ${toBranch}`); // get the electron/electron commits - const electron = { owner: 'electron', repo: 'electron', dir: electronDir }; + const electron = { owner: 'electron', repo: 'electron', dir: ELECTRON_DIR }; await addRepoToPool(pool, electron, fromRef, toRef); // remove any old commits