File: run.sh

package info (click to toggle)
node-recast 0.23.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,292 kB
  • sloc: javascript: 938; sh: 22; makefile: 4
file content (30 lines) | stat: -rwxr-xr-x 669 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash

set -ex

cd $(dirname $0)/data

BAB_TAG=v$(node -p 'require("@babel/parser/package.json").version')

if [ ! -d babel-parser ]
then
    git clone --branch "$BAB_TAG" --depth 1 \
        https://github.com/babel/babel.git
    mv babel/packages/babel-parser .
    rm -rf babel
fi

if [ ! -d graphql-tools-src ]
then
    git clone https://github.com/apollographql/graphql-tools.git
    pushd graphql-tools
    git reset --hard 90e37c477225e56edfacc9f2a1a8336c766de93b
    popd
    mv graphql-tools/src \
       graphql-tools-src
    rm -rf graphql-tools
fi

cd .. # back to the recast/test/ directory

exec mocha --reporter spec --full-trace $@ run.js