Migration Guide
Applying New Version Patches
This guide explains the minimal and repeatable steps for applying a new version patch after downloading the patches/ folder from the /get-new-version endpoint.
Overview
- Download the generated patches folder from
/new-version-get. - Place the entire
patches/directory inside your project’s root. - Apply the patch files.
- Resolve conflicts if needed.
Workflow
1. Place the patches in your repository
After downloading from /new-version-get, you will receive a structure like:
patches/
appcatalystrn-{prev_version}-to-{latest_version}.patch
appcatalystrn-{prev_version}-to-{latest_version}.patch.json
CHANGELOG.md (optional)*.path.json file contains metadata and are not needed for applying patches.
Extract or copy the patches/ directory directly into the root of your codebase:
your-project/
patches/
src/
...2. Inspect the patch files
Before applying:
Look at the contents of the patch to understand what changes will be made:
git apply --stat patches/new-version.patchTo do a dry run and check for potential issues:
git apply --check patches/new-version.patch3. Apply the patch
If the patch is a standard unified diff:
git apply --index patches/new-version.patchIf it requires 3-way merge:
git apply --3way patches/new-version.patch4. If the patch fails or has conflicts
git apply --reject --whitespace=fix patches/new-version.patchYou may see .rej files indicating rejected hunks.
Manually fix the conflicting sections, then:
git add -A
git commit -m "Apply patch: new-version.patch"Tips & Best Practices
- Always inspect patch contents before applying.
- Use
git apply --indexto stage changes directly. - For large/complex patches, create a dedicated branch:
git checkout -b patch/new-version-YYYYMMDD