Skip to content

Commit

Permalink
fix(ci): windows build
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Oct 26, 2024
1 parent c812bd7 commit 9f72c26
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
File renamed without changes.
32 changes: 32 additions & 0 deletions scripts/skip-ssr-app-vercel-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

LAST_DEPLOY_COMMIT=$(git rev-parse HEAD^)

CHANGED_FILES=$(git diff --name-only $LAST_DEPLOY_COMMIT HEAD)

# Define an array of paths and files to check
CHECK_PATHS_AND_FILES=("apps/server/" "packages/" "package.json" "pnpm-lock.yaml")

ONLY_SERVER_OR_PACKAGES_CHANGES=true
for file in $CHANGED_FILES; do
MATCH_FOUND=false
for path in "${CHECK_PATHS_AND_FILES[@]}"; do
if [[ $file == $path* ]]; then
MATCH_FOUND=true
break
fi
done
if [ "$MATCH_FOUND" = false ]; then
ONLY_SERVER_OR_PACKAGES_CHANGES=false
break
fi
done

if [ "$ONLY_SERVER_OR_PACKAGES_CHANGES" = true ]; then
echo "continue"
echo "Changed files: $CHANGED_FILES"
exit 1
else
echo "skip"
exit
fi

0 comments on commit 9f72c26

Please sign in to comment.