Skip to content

Commit

Permalink
fix: move unshallow script before everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Jan 9, 2024
1 parent 4f1dd12 commit 4476d30
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -7,7 +7,7 @@
"astro": "astro",
"dev": "astro dev",
"dev:vercel": "vercel dev --listen 4321",
"build": "astro build",
"build": "bash ./scripts/unshallowVercel.sh && astro build",
"preview": "astro preview",
"check": "astro check",
"lint": "eslint . --ext .ts,.js,.astro --report-unused-disable-directives",
Expand Down
7 changes: 0 additions & 7 deletions scripts/getLastModified.sh
@@ -1,10 +1,3 @@
# Unshallow the repository when running on Vercel
# Vercel doesn't register the remote in the local repository so the full URL is used.
# Also, the branch is always named master on Vercel's build system
if [[ $VERCEL == "1" ]]; then
git pull --unshallow https://github.com/Princesseuh/erika.florist.git "${PUBLIC_VERCEL_GIT_COMMIT_SHA}:master" >/dev/null 2>&1
fi

find src/content/wiki -name "*.mdx"|while read fname; do
echo "$fname|"
git log -1 --date=iso --pretty="format:%cI|%H;" -- "$fname"
Expand Down
7 changes: 7 additions & 0 deletions scripts/unshallowVercel.sh
@@ -0,0 +1,7 @@
# Unshallow the repository when running on Vercel
# Vercel doesn't register the remote in the local repository so the full URL is used.
# Also, the branch is always named master on Vercel's build system
if [[ $VERCEL == "1" ]]; then
echo "Unshallowing repository for Vercel..."
git pull --unshallow https://github.com/Princesseuh/erika.florist.git "${PUBLIC_VERCEL_GIT_COMMIT_SHA}:master" >/dev/null 2>&1
fi

0 comments on commit 4476d30

Please sign in to comment.