Skip to content

Scheduling infrastructure for absolutely everyone.

chore: Skip static file copy if not required (#23903)

Alex van Andel4689775a1f1d
diff --git a/apps/web/package.json b/apps/web/package.json
index 44c2a4d4ec9..5e8e97396b3 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -7,7 +7,7 @@
"analyze:server": "BUNDLE_ANALYZE=server next build",
"analyze:browser": "BUNDLE_ANALYZE=browser next build",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next",
- "dev": "yarn copy-static && next dev --turbopack",
+ "dev": "turbo run copy-app-store-static && next dev --turbopack",
"dev:scan": "yarn dev & npx --yes react-scan@latest localhost:3000",
"dev:cron": "npx tsx cron-tester.ts",
"dev-https": "NODE_TLS_REJECT_UNAUTHORIZED=0 next dev --experimental-https",
@@ -16,8 +16,9 @@
"type-check": "tsc --pretty --noEmit",
"type-check:ci": "tsc-absolute --pretty --noEmit",
"sentry:release": "NODE_OPTIONS='--max-old-space-size=6144' node scripts/create-sentry-release.js",
- "copy-static": "node scripts/copy-app-store-static.js",
- "build": "yarn copy-static && next build && yarn sentry:release",
+ "copy-static": "turbo run copy-app-store-static",
+ "copy-app-store-static": "node scripts/copy-app-store-static.js",
+ "build": "turbo run copy-app-store-static && next build && yarn sentry:release",
"start": "next start",
"lint": "eslint . --ignore-path .gitignore",
"lint:fix": "eslint . --ext .ts,.js,.tsx,.jsx --fix",
diff --git a/apps/web/scripts/copy-app-store-static.js b/apps/web/scripts/copy-app-store-static.js
index 440638fd54e..68d74babaa5 100644
--- a/apps/web/scripts/copy-app-store-static.js
+++ b/apps/web/scripts/copy-app-store-static.js
@@ -20,7 +20,7 @@ const copyAppStoreStatic = () => {
fs.mkdirSync(destDir, { recursive: true });
}
- // Copy file to destination
+ // Copy file to destination (Turborepo caching handles change detection)
const destPath = path.join(destDir, fileName);
fs.copyFileSync(file, destPath);
console.log(`Copied ${file} to ${destPath}`);
diff --git a/turbo.json b/turbo.json
index d6301c1d1da..354a54b469b 100644
--- a/turbo.json
+++ b/turbo.json
@@ -283,6 +283,11 @@
"_CAL_INTERNAL_PAST_BOOKING_RESCHEDULE_CHANGE_TEAM_IDS"
],
"tasks": {
+ "@calcom/web#copy-app-store-static": {
+ "inputs": ["../../packages/app-store/**/static/**/*"],
+ "outputLogs": "new-only",
+ "outputs": ["public/app-store/**"]
+ },
"@calcom/prisma#build": {
"cache": false,
"dependsOn": ["post-install"]