From 34218afdae93a6c9298dd92d9105172dd4c92cf7 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 26 Jun 2015 23:41:19 +0100 Subject: [PATCH] clean up build website script --- .gitignore | 1 + .npmignore | 1 + tools/build-website.sh | 13 ++++++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f1ac2c5c93..b00be10aca 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ test/core/tmp /packages/babel-runtime/helpers/*.js /packages/babel-runtime/regenerator/*.js /lib +_babel.github.io diff --git a/.npmignore b/.npmignore index ce9830e556..a670da9a98 100644 --- a/.npmignore +++ b/.npmignore @@ -13,3 +13,4 @@ /vendor /packages /src +_babel.github.io diff --git a/tools/build-website.sh b/tools/build-website.sh index e3d30c27a1..b6dce23e48 100755 --- a/tools/build-website.sh +++ b/tools/build-website.sh @@ -1,9 +1,16 @@ #!/bin/sh set -e -git clone git@github.com:babel/babel.github.io.git -cd babel.github.io -ln -s .. _babel +if [ ! -d ./_babel.github.io ]; then + git clone git@github.com:babel/babel.github.io.git _babel.github.io +fi + +cd _babel.github.io + +if [ ! -d ./_babel ]; then + ln -s .. _babel +fi + make build git commit -am "${TRAVIS_TAG}" git push "https://${GH_TOKEN}@github.com/babel/babel.github.io"