Skip to content

Commit 223b83a

Browse files
committed
lint file
1 parent 68cacac commit 223b83a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

libexec/build-macos-x86_64

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
#/bin/sh
1+
#!/bin/sh
22

33
set -e
44
set -u
55

66
BASEDIR="${PWD}"
77

8-
TARGET_PLATFORM=x86_64-darwin
9-
RUBY_TARGET_PLATFORM=x86_64-darwin
8+
export TARGET_PLATFORM=x86_64-darwin
9+
export RUBY_TARGET_PLATFORM=x86_64-darwin
1010

1111
bundle install
1212

13+
# shellcheck disable=SC2034
1314
RUBY_PLATFORM=$(./libexec/metadata ruby_platform)
1415
GEM_PLATFORM=$(./libexec/metadata gem_platform)
1516
GEM_VERSION=$(./libexec/metadata gem_version)
1617
NODE_VERSION=$(./libexec/metadata node_version)
1718
LIBV8_VERSION=$(./libexec/metadata libv8_version)
1819

19-
./libexec/download-node $NODE_VERSION
20-
./libexec/extract-node $NODE_VERSION
20+
./libexec/download-node "$NODE_VERSION"
21+
./libexec/extract-node "$NODE_VERSION"
2122

2223
# Validate that we have the correct V8 version.
2324
libv8_version_h=$(./libexec/metadata libv8_version_h)
@@ -27,18 +28,16 @@ if [ "$libv8_version_h" != "$LIBV8_VERSION" ]; then
2728
fi
2829

2930
# Build the package.
30-
./libexec/build-libv8 $NODE_VERSION
31-
./libexec/build-monolith $NODE_VERSION
32-
./libexec/inject-libv8 $NODE_VERSION
31+
./libexec/build-libv8 "$NODE_VERSION"
32+
./libexec/build-monolith "$NODE_VERSION"
33+
./libexec/inject-libv8 "$NODE_VERSION"
3334

3435
# Run V8 tests.
3536
cd test/gtest
3637
cmake -S . -B build
3738
cd build
3839
cmake --build .
39-
./c_v8_tests
40-
41-
if [ $? -ne 0 ]; then
40+
if ! ./c_v8_tests; then
4241
echo "Tests failed."
4342
exit 1
4443
fi
@@ -48,12 +47,13 @@ cd "${BASEDIR}"
4847
bundle exec rake binary
4948

5049
# Test that the gem can be installed and used.
51-
gem install pkg/libv8-node-$GEM_VERSION-$GEM_PLATFORM.gem
50+
gem install pkg/libv8-node-"$GEM_VERSION"-"$GEM_PLATFORM".gem
5251

5352
rm -rf test/mini_racer
5453
git clone https://github.com/rubyjs/mini_racer.git test/mini_racer --depth 1
5554
cd test/mini_racer
5655
ruby -i -ne "\$_ =~ /^\s+LIBV8_NODE_VERSION/ ? print(\" LIBV8_NODE_VERSION = \\\"$GEM_VERSION\\\"\\n\") : print" lib/mini_racer/version.rb
56+
# shellcheck disable=SC2016
5757
ruby -i -ne '$_ =~ /spec.required_ruby_version/ ? "" : print' mini_racer.gemspec
5858
bundle install
5959
bundle exec rake compile

0 commit comments

Comments
 (0)