Skip to content

Commit

Permalink
GODRIVER-3148 Fix Node Install and Reviewer Assignment (mongodb-labs#414
Browse files Browse the repository at this point in the history
)

* remove node archive path before installing

* fix removed path

* fix handling of install

* fix location check

* fix exit codes

* fix download again

* fix reviewer check
  • Loading branch information
blink1073 authored Mar 6, 2024
1 parent c9e4858 commit 47a841a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .evergreen/github_app/assign-reviewer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ if (issue == null) {
}
const { number } = issue

if (issue.requested_reviewers.length > 1) {
if (issue.requested_reviewers.length > 0) {
console.log("Review already requested!");
process.exit(1);
process.exit(0);
}

if (issue.draft) {
console.log("PR is in draft mode!");
process.exit(1);
process.exit(0);
}

const reviewers = [];
Expand Down
26 changes: 17 additions & 9 deletions .evergreen/install-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,24 @@ set -o xtrace
curl "${CURL_FLAGS[@]}" "${node_download_url}" --output "$node_archive_path"

if [[ "$file_extension" = "zip" ]]; then
unzip -q "$node_archive_path" -d "${NODE_ARTIFACTS_PATH}"
mkdir -p "${NODE_ARTIFACTS_PATH}/nodejs"
# Windows "bins" are at the top level
mv "${NODE_ARTIFACTS_PATH}/${node_directory}" "${NODE_ARTIFACTS_PATH}/nodejs/bin"
# Need to add executable flag ourselves
chmod +x "${NODE_ARTIFACTS_PATH}/nodejs/bin/node.exe"
chmod +x "${NODE_ARTIFACTS_PATH}/nodejs/bin/npm"
if [[ -d "${NODE_ARTIFACTS_PATH}/nodejs/bin/${node_directory}" ]]; then
echo "Node.js already installed!"
else
unzip -q "$node_archive_path" -d "${NODE_ARTIFACTS_PATH}"
mkdir -p "${NODE_ARTIFACTS_PATH}/nodejs"
# Windows "bins" are at the top level
mv "${NODE_ARTIFACTS_PATH}/${node_directory}" "${NODE_ARTIFACTS_PATH}/nodejs/bin"
# Need to add executable flag ourselves
chmod +x "${NODE_ARTIFACTS_PATH}/nodejs/bin/node.exe"
chmod +x "${NODE_ARTIFACTS_PATH}/nodejs/bin/npm"
fi
else
tar -xf "$node_archive_path" -C "${NODE_ARTIFACTS_PATH}"
mv "${NODE_ARTIFACTS_PATH}/${node_directory}" "${NODE_ARTIFACTS_PATH}/nodejs"
if [[ -d "${NODE_ARTIFACTS_PATH}/nodejs/${node_directory}" ]]; then
echo "Node.js already installed!"
else
tar -xf "$node_archive_path" -C "${NODE_ARTIFACTS_PATH}"
mv "${NODE_ARTIFACTS_PATH}/${node_directory}" "${NODE_ARTIFACTS_PATH}/nodejs"
fi
fi

if [[ $operating_system != "win" ]]; then
Expand Down

0 comments on commit 47a841a

Please sign in to comment.