From 1ada0ab5d6ede4659e8a47600e6453bc74aec5ba Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 15 Feb 2021 15:47:47 -0500 Subject: [PATCH] release: cd to Etherpad root directory --- src/bin/release.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/release.js b/src/bin/release.js index 9f0b251ec..6d08773d7 100644 --- a/src/bin/release.js +++ b/src/bin/release.js @@ -6,6 +6,7 @@ process.on('unhandledRejection', (err) => { throw err; }); const fs = require('fs'); const childProcess = require('child_process'); +const path = require('path'); const semver = require('semver'); /* @@ -25,6 +26,9 @@ if (!release) { throw new Error('No release type included'); } +const cwd = path.join(fs.realpathSync(__dirname), '../../'); +process.chdir(cwd); + const readJson = (filename) => JSON.parse(fs.readFileSync(filename, {encoding: 'utf8', flag: 'r'})); const writeJson = (filename, obj) => { let json = JSON.stringify(obj, null, 2);