-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·34 lines (28 loc) · 871 Bytes
/
run
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
31
32
33
34
#!/usr/bin/env bash
set -e
if [ "$1" == "--del-cache" ] || [ "$1" == "-dc" ]; then
echo "> ⚠️ Deleting turbo cache"
rm -rf ./node_modules/.cache/turbo
else
echo "> Keeping cache"
fi
before=$(cat apps/web/package.json | jq .description)
node change-pkg.js
after=$(cat apps/web/package.json | jq .description)
if [ $before != $after ]; then
echo "> apps/web/package.json description changed from $before to $after"
else
echo "apps/web/package.json description did not change"
exit 1
fi
TURBO_SRC_DIR="$HOME/dev/vercel-projects/turborepo/cli"
echo "> Building CLI from $TURBO_SRC_DIR"
pushd $PWD > /dev/null
cd "$TURBO_SRC_DIR"
make > /dev/null
popd > /dev/null
TURBO_FRESH_BIN="$TURBO_SRC_DIR/turbo"
echo "> Running turbo run build from $TURBO_FRESH_BIN"
echo "=========================="
$TURBO_FRESH_BIN run build
echo "=========================="