Skip to content

Commit

Permalink
Only download compat-table if it's not already downloaded (babel#11081)
Browse files Browse the repository at this point in the history
* Only download compat-table if it's not already downloaded

* Use git rev-parse
  • Loading branch information
nicolo-ribaudo authored and rajasekarm committed Feb 17, 2020
1 parent 943ab5d commit e103fb2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/babel-compat-data/scripts/download-compat-table.sh
Expand Up @@ -2,6 +2,18 @@
set -e

COMPAT_TABLE_COMMIT=4e9369a699b0e15ba5c21586ce3bdd34299db9c1
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 --branch=gh-pages --single-branch --shallow-since=2019-11-14 https://github.com/kangax/compat-table.git build/compat-table
Expand Down

0 comments on commit e103fb2

Please sign in to comment.