* chore: update compat-table * chore: friendly to node < 14 contributors Co-Authored-By: Brian Ng <bng412@gmail.com> Co-authored-by: Brian Ng <bng412@gmail.com>
21 lines
511 B
Bash
Executable File
21 lines
511 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
COMPAT_TABLE_COMMIT=163aacb6f93e325231d578e31c03141cd9086dbb
|
|
GIT_HEAD=build/compat-table/.git/HEAD
|
|
|
|
if [ -d "build/compat-table" ]; then
|
|
cd build/compat-table
|
|
commit="$(git rev-parse HEAD)"
|
|
cd ../..
|
|
|
|
if [ $commit == $COMPAT_TABLE_COMMIT ]; then
|
|
exit 0
|
|
fi
|
|
fi
|
|
|
|
rm -rf build/compat-table
|
|
mkdir -p build
|
|
git clone --single-branch --shallow-since=2020-04-01 https://github.com/kangax/compat-table.git build/compat-table
|
|
cd build/compat-table && git checkout -q $COMPAT_TABLE_COMMIT
|