babel/packages/babel-compat-data/scripts/download-compat-table.sh
Huáng Jùnliàng 4acb73449f
Update compat table (#12850)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-02-23 15:32:54 +01:00

21 lines
511 B
Bash
Executable File

#!/bin/bash
set -e
COMPAT_TABLE_COMMIT=ec317e988ed0011cc5d24364e0f4f3a2e86d1f7f
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