Scheduling infrastructure for absolutely everyone.
Build fixes
zomars40f1f9714ebe
diff --git a/package.json b/package.jsonindex af6ff392686..ede2ad9f156 100644--- a/package.json+++ b/package.json@@ -10,19 +10,19 @@"node": ">=14.19.x"},"scripts": {- "dev": "next build && PORT=3002 next start",- "dev-real": "PORT=3002 next dev",- "start": "PORT=3002 next start","build": "next build",- "lint": "next lint",+ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",+ "dev-real": "PORT=3002 next dev",+ "dev": "next build && PORT=3002 next start","lint-fix": "next lint --fix && prettier --write .",+ "lint": "next lint",+ "prebuild": "cd ../.. && yarn workspace @calcom/prisma generate-schemas",+ "start": "PORT=3002 next start","test": "jest --detectOpenHandles --passWithNoTests",- "type-check": "tsc --pretty --noEmit",- "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"+ "type-check": "tsc --pretty --noEmit"},"devDependencies": {"@calcom/tsconfig": "*",- "@typescript-eslint/eslint-plugin": "^5.25.0","babel-jest": "^28.1.0","jest": "^28.1.0","node-mocks-http": "^1.11.0"diff --git a/scripts/vercel-deploy.sh b/scripts/vercel-deploy.shindex 2c801645a14..0de5b672b48 100755--- a/scripts/vercel-deploy.sh+++ b/scripts/vercel-deploy.sh@@ -1,27 +1,24 @@# github submodule repo addresses without https:// prefix-BRANCH_TO_CLONE="-b feat/api-keys"--# This didn't work ¯\_(ツ)_/¯-# declare -A remotes=(-# ["apps/website"]="github.com/calcom/website"-# ["apps/api"]="github.com/calcom/api"-# )+BRANCH_TO_CLONE=""+SUBMODULE_GITHUB=github.com/calcom/api+SUBMODULE_PATH=apps/api+COMMIT=$VERCEL_GIT_COMMIT_SHAif [ "$VERCEL_GIT_COMMIT_SHA" == "" ]; then- echo "Error: VERCEL_GIT_COMMIT_SHA is empty"- exit 0+ echo "Error: VERCEL_GIT_COMMIT_SHA is empty"+ exit 0fi# github access token is necessary# add it to Environment Variables on Vercelif [ "$GITHUB_ACCESS_TOKEN" == "" ]; then- echo "Error: GITHUB_ACCESS_TOKEN is empty"- exit 0+ echo "Error: GITHUB_ACCESS_TOKEN is empty"+ exit 0fi# We add an exception to test on stagingif [ "$VERCEL_GIT_COMMIT_REF" == "staging" ]; then- BRANCH_TO_CLONE="-b $VERCEL_GIT_COMMIT_REF"+ BRANCH_TO_CLONE="-b $VERCEL_GIT_COMMIT_REF"fi# stop execution on error - don't let it build if something goes wrong@@ -38,52 +35,26 @@ git clone $BRANCH_TO_CLONE https://[email protected]/calcom/cal.coecho "Cloned"-# get submodule commit-output=$(git submodule status --recursive) # get submodule info--# Extract each submodule commit hash and path-submodules=$(echo "$output" | sed "s/ /,/g")--for submodule in $submodules; do- IFS=',' read -ra submodule_parts <<<"$submodule"- COMMIT=$(echo ${submodule_parts[0]} | sed "s/-/ /g")- SUBMODULE_PATH=${submodule_parts[1]}- echo "COMMIT: $COMMIT SUBMODULE_PATH: $SUBMODULE_PATH"-- # This should be a hash table but couldn't make it work ¯\_(ツ)_/¯- # SUBMODULE_GITHUB=$remotes[$SUBMODULE_PATH]- if [ "$SUBMODULE_PATH" == "apps/website" ]; then- SUBMODULE_GITHUB=github.com/calcom/website- fi-- if [ "$SUBMODULE_PATH" == "apps/api" ]; then- SUBMODULE_GITHUB=github.com/calcom/api- COMMIT=$VERCEL_GIT_COMMIT_SHA- fi-- echo "Submodule init"-- # set up an empty temporary work directory- rm -rf tmp || true # remove the tmp folder if exists- mkdir tmp # create the tmp folder- cd tmp # go into the tmp folder+# set up an empty temporary work directory+rm -rf tmp || true # remove the tmp folder if exists+mkdir tmp # create the tmp folder+cd tmp # go into the tmp folder- # checkout the current submodule commit- git init # initialise empty repo- git remote add $SUBMODULE_PATH https://$GITHUB_ACCESS_TOKEN@$SUBMODULE_GITHUB # add origin of the submodule- git fetch --depth=1 $SUBMODULE_PATH $COMMIT # fetch only the required version- git checkout $COMMIT # checkout on the right commit+# checkout the current submodule commit+git init # initialise empty repo+git remote add $SUBMODULE_PATH https://$GITHUB_ACCESS_TOKEN@$SUBMODULE_GITHUB # add origin of the submodule+git fetch --depth=1 $SUBMODULE_PATH $COMMIT # fetch only the required version+git checkout $COMMIT # checkout on the right commit- # move the submodule from tmp to the submodule path- cd .. # go folder up- rm -rf tmp/.git # remove .git- mv tmp/* $SUBMODULE_PATH/ # move the submodule to the submodule path+# move the submodule from tmp to the submodule path+cd .. # go folder up+rm -rf tmp/.git # remove .git+mv tmp/* $SUBMODULE_PATH/ # move the submodule to the submodule path- # clean up- rm -rf tmp # remove the tmp folder-done+# clean up+rm -rf tmp # remove the tmp folder-git diff --quiet HEAD^ HEAD ':!/apps/docs/*' ':!/apps/website/*' ':!/apps/web/*'+git diff --quiet HEAD^ HEAD ':!/apps/docs/*' ':!/apps/website/*' ':!/apps/web/*' ':!/apps/swagger/*' ':!/apps/console/*'echo "✅ - Build can proceed"-exit 1\ No newline at end of file+exit 1diff --git a/tsconfig.json b/tsconfig.jsonindex 26060017f9f..2714b86c1c8 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -9,12 +9,6 @@"@/*": ["*"]}},- "include": [- "next-env.d.ts",- "../../packages/types/*.d.ts",- "../../packages/types/next-auth.d.ts",- "**/*.ts",- "**/*.tsx"- ],+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],"exclude": ["node_modules", "templates", "auth"]}