Skip to content

Commit 7cde85d

Browse files
Revert "chore(NODE-6603): set errexit in install script and download prebuilt windows zstd (#51)"
This reverts commit 0063c4e.
1 parent 0063c4e commit 7cde85d

File tree

3 files changed

+4
-30
lines changed

3 files changed

+4
-30
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: npm run install-zstd
2929
shell: bash
3030

31-
- name: install dependencies and compile
31+
- name: install dependencies and compmile
3232
run: npm install --loglevel verbose
3333
shell: bash
3434

binding.gyp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,9 @@
2323
{
2424
'link_settings': {
2525
'libraries': [
26-
'<(module_root_dir)/deps/zstd/static/zstd_static.lib'
26+
'<(module_root_dir)/deps/zstd/build/cmake/lib/Debug/zstd_static.lib'
2727
]
2828
},
29-
'include_dirs': [
30-
'<(module_root_dir)/deps/zstd/include'
31-
],
3229
},
3330
{ # macos and linux
3431
'link_settings': {

etc/install-zstd.sh

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,16 @@
11
#!/bin/sh
22
set -o xtrace
3-
set -o errexit
43

54
clean_deps() {
65
rm -rf deps
76
}
87

9-
download_windows() {
10-
# windows does not support symlinks, so we must download the `win64` build specifically
11-
curl -L -o zstd.zip "https://github.com/facebook/zstd/releases/download/v$ZSTD_VERSION/zstd-v$ZSTD_VERSION-win64.zip"
12-
# unlike tar, unzip does not have a "strip components" option. so we unzip the file, copy all the contents to the correct location,
13-
# and then delete both the .zip and the unziped content.
14-
unzip zstd.zip
15-
cp -r zstd-v$ZSTD_VERSION-win64/* deps/zstd
16-
rm zstd.zip
17-
rm -rf zstd-v$ZSTD_VERSION-win64
18-
}
19-
208
download_zstd() {
219
mkdir -p deps/zstd
2210
ZSTD_VERSION=$(node -p "require('./package.json')['mongodb:zstd_version']")
23-
is_windows=$(node -p "process.platform === 'win32'")
2411

25-
if [ "$is_windows" == "true" ]; then
26-
download_windows
27-
exit 0 # no need to build windows
28-
else
29-
# tar flags
30-
# -C specifies the output location
31-
# --strip-components removes one level of directory nesting
32-
# curl flags
33-
# -L follows redirects
34-
curl -L "https://github.com/facebook/zstd/releases/download/v$ZSTD_VERSION/zstd-$ZSTD_VERSION.tar.gz" \
35-
| tar -zxf - -C deps/zstd --strip-components 1
36-
fi
12+
curl -L "https://github.com/facebook/zstd/releases/download/v$ZSTD_VERSION/zstd-$ZSTD_VERSION.tar.gz" \
13+
| tar -zxf - -C deps/zstd --strip-components 1
3714
}
3815

3916
build_zstd() {

0 commit comments

Comments
 (0)