Patches
Apply code patches to your repository during build to modify configs, env, or code
Patches allow you to apply file-level modifications to your repository during the build process. Patches are applied after cloning the repository and before building, letting you override or add files without modifying the source repository directly.
Use Cases
- Override configuration files for specific environments
- Inject environment-specific settings
- Modify source code before building
- Add files that shouldn't be committed to the repository
How It Works
- Navigate to the Patches section in your application settings
- Click Create Patch to add a new patch
- Select a file from the repository tree to edit, or create a new file
- Make your modifications and click Save Patch
Patches are applied in order every time a build is triggered, after the repository is cloned and before the build step runs.
Creating a Patch
Edit an Existing File
- Click Create Patch
- Browse the file tree and select the file you want to modify
- Edit the file content in the editor
- Click Save Patch
Create a New File
- Click Create Patch
- Navigate to the desired directory in the file tree
- Click New file in root or navigate to a subdirectory
- Enter the filename and content
- Click Create, then Save Patch
Delete a File
- Click Create Patch
- Select the file you want to remove
- Click Mark for deletion
- Click Save Patch
Patches do not modify your original repository. They are only applied temporarily during the build process.
Managing Patches
You can view all configured patches in the Patches section. Each patch shows the target file path and the type of operation (edit, create, or delete). You can edit or remove patches at any time.
Patches are persistent and will be applied on every build. If you no longer need a patch, make sure to remove it to avoid unintended modifications in future builds.
If a patch targets a file that doesn't exist in the repository (for edit operations), the build will fail. Make sure your patches reference valid file paths.