ci: remove deprecated submodule code (#20731)
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
name: Submodule Sync
|
||||
on:
|
||||
schedule:
|
||||
# Runs "At minute 15 past every 4th hour." (see https://crontab.guru)
|
||||
- cron: "15 */4 * * *"
|
||||
workflow_dispatch: ~
|
||||
jobs:
|
||||
submodule-sync:
|
||||
name: Submodule update
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
- name: Commit
|
||||
run: |
|
||||
git config user.email "actions@github.com"
|
||||
git config user.name "github-actions"
|
||||
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit"
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
echo "Updating submodules recursively"
|
||||
pwd
|
||||
git submodule update --init --recursive
|
||||
@@ -16,9 +16,6 @@ To test API in your local instance, you have the following pre-requisites:
|
||||
1a1f8138-0bfc-4f37-b4af-1e24fd145839
|
||||
```
|
||||
</Step>
|
||||
<Step title="Install API submodule">
|
||||
Next, you need to install API submodule by following the instructions provided in [API submodule](/developing/local-development#api)
|
||||
</Step>
|
||||
<Step title="Start development server and create API key">
|
||||
Start the cal.com server using `yarn dev` on localhost and create the test API keys by visiting `/settings/developer/api-keys`
|
||||
</Step>
|
||||
|
||||
@@ -29,12 +29,6 @@ Note: `docker compose` without the hyphen is now the primary method of using doc
|
||||
cd calcom-docker
|
||||
```
|
||||
|
||||
3. Update the calcom submodule
|
||||
|
||||
```
|
||||
git submodule update --remote --init
|
||||
```
|
||||
|
||||
4. Rename `.env.example` to `.env` and then update `.env`
|
||||
|
||||
5. Build and start Cal.com via docker compose
|
||||
@@ -67,20 +61,8 @@ These variables must be provided at the time of the docker build, and can be pro
|
||||
|
||||
* NEXTAUTH_SECRET
|
||||
|
||||
### Git Submodules
|
||||
|
||||
This repository uses a git submodule.
|
||||
|
||||
To update the calcom submodule, use the following command:
|
||||
|
||||
```
|
||||
git submodule update --remote --init
|
||||
```
|
||||
|
||||
For more advanced usage, please refer to the git documentation: [https://git-scm.com/book/en/v2/Git-Tools-Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
* SSL edge termination: If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service.
|
||||
|
||||
* Failed to commit changes: Invalid 'prisma.user.create()': Certain versions may have trouble creating a user if the field `metadata` is empty. Using an empty json object `{}` as the field value should resolve this issue. Also, the `id` field will autoincrement, so you may also try leaving the value of `id` as empty.
|
||||
* Failed to commit changes: Invalid 'prisma.user.create()': Certain versions may have trouble creating a user if the field `metadata` is empty. Using an empty json object `{}` as the field value should resolve this issue. Also, the `id` field will autoincrement, so you may also try leaving the value of `id` as empty.
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Skip if `.gitmodules` exists
|
||||
[ -f .gitmodules ] && {
|
||||
echo ".gitmodules already initialized"
|
||||
exit 0
|
||||
}
|
||||
|
||||
./git-setup.sh website console
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/sh
|
||||
# If no project name is given
|
||||
if [ $# -eq 0 ]; then
|
||||
# Display usage and stop
|
||||
echo "Usage: git-setup.sh <console,website>"
|
||||
exit 1
|
||||
fi
|
||||
# Get remote url to support either https or ssh
|
||||
remote_url=$(echo $(git config --get remote.origin.url) | sed 's![^/]*$!!')
|
||||
# Loop through the requested modules
|
||||
for module in "$@"; do
|
||||
echo "Setting up '$module' module..."
|
||||
# Set the project git URL
|
||||
project=$remote_url$module.git
|
||||
# Check if we have access to the module
|
||||
if [ "$(git ls-remote "$project" 2>/dev/null)" ]; then
|
||||
echo "You have access to '${module}'"
|
||||
# Create the .gitmodules file if it doesn't exist
|
||||
([ -e ".gitmodules" ] || touch ".gitmodules") && [ ! -w ".gitmodules" ] && echo cannot write to .gitmodules && exit 1
|
||||
# Prevents duplicate entries
|
||||
git config -f .gitmodules --unset-all "submodule.apps/$module.branch"
|
||||
# Add the submodule
|
||||
git submodule add --force $project "apps/$module"
|
||||
|
||||
# Determine the branch based on module
|
||||
branch="main"
|
||||
if [ "$module" = "website" ]; then
|
||||
branch="production"
|
||||
fi
|
||||
|
||||
# Set the default branch
|
||||
git config -f .gitmodules --add "submodule.apps/$module.branch" ${branch}
|
||||
|
||||
# Update to the latest of branch in that submodule
|
||||
cd apps/$module && git pull origin ${branch} && cd ../..
|
||||
|
||||
# We forcefully added the subdmoule which was in .gitignore, so unstage it.
|
||||
git restore --staged apps/$module
|
||||
else
|
||||
echo "You don't have access to: '${module}' module."
|
||||
fi
|
||||
done
|
||||
git restore --staged .gitmodules
|
||||
Reference in New Issue
Block a user