From c282184d9f972bb54dafa6fe3a69bbca3ae6cac7 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Fri, 25 Sep 2020 03:52:36 -0700 Subject: [PATCH] Run generate-changelog with xplat node Summary: This way we don't need to depend on Sandcastle configurations. amurawska pointed out that the header in `generate-changelog.js` indicates it must be run with Node 6, but trying to do so actually raises a Syntax error. Reviewed By: mweststrate Differential Revision: D23904875 fbshipit-source-id: 264f3b16d64ebfbae6afb0028715f67624166499 --- scripts/prepare-release.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/prepare-release.sh b/scripts/prepare-release.sh index 964d6e118..8c0b69f4d 100755 --- a/scripts/prepare-release.sh +++ b/scripts/prepare-release.sh @@ -7,9 +7,18 @@ set -e darwin=false +facebook=false case "$(uname)" in Darwin*) darwin=true ;; esac +case "$(hostname -f)" in + *.facebook.com) facebook=true +esac + +nodejs="/usr/bin/env node" +if [[ $facebook == true ]]; then + nodejs="$(hg root)/xplat/third-party/node/bin/node" +fi if ! jq --version > /dev/null; then if $darwin; then @@ -84,7 +93,7 @@ echo "Bumping version number for android related files..." "$SONAR_DIR"/scripts/bump.sh "$VERSION" # Generate changelog -"$DESKTOP_DIR"/scripts/generate-changelog.js +$nodejs "$DESKTOP_DIR"/scripts/generate-changelog.js # Create commit echo "Committing the files..."