...
1#!/bin/bash
2
3REPO_DIR=./graphql-js
4PATH=./node_modules/.bin:$PATH
5EXPORTER_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6
7cd $EXPORTER_ROOT
8
9if [[ -d "$REPO_DIR" ]] ; then
10 echo "fetching latest graphql-js"
11 cd $REPO_DIR
12 git fetch origin master
13 git checkout origin/master
14 git reset --hard
15else
16 echo "cloning graphql-js"
17 git clone --no-tags --single-branch -- https://github.com/graphql/graphql-js $REPO_DIR
18 cd $REPO_DIR
19 git checkout origin/master
20fi
21
22cd $EXPORTER_ROOT
23
24echo "installing js dependencies"
25npm install
26
27echo "exporting tests"
28babel-node ./export.js
View as plain text