Skip to content

Commit e5b7cb0

Browse files
authored
ci: ignore tldraw.new build script (tldraw#8731)
### Change type - [ ] `bugfix` - [ ] `improvement` - [ ] `feature` - [ ] `api` - [x] `other`
1 parent 5031fbe commit e5b7cb0

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

apps/tldraw-new/vercel.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"ignoreCommand": "bash ../../internal/scripts/vercel/should-build-tldraw-new.sh",
23
"redirects": [
34
{
45
"source": "/(.*)",
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
set -eux
3+
4+
SCRIPT_DIR=$(dirname "$0")
5+
REPO_ROOT=$(realpath "$SCRIPT_DIR/../../..")
6+
cd "$REPO_ROOT"
7+
8+
if [[ "$VERCEL_ENV" == "production" ]] ; then
9+
echo "Always build on production";
10+
exit 1;
11+
fi
12+
13+
## main is not production anymore, but we still always want to build it
14+
if [[ "$VERCEL_GIT_COMMIT_REF" == "main" ]] ; then
15+
echo "Always build on main";
16+
exit 1;
17+
fi
18+
19+
## on PR builds, only rebuild if the tldraw-new directory changed
20+
git diff HEAD^ HEAD --quiet -- "./apps/tldraw-new/"

0 commit comments

Comments
 (0)