Update Pragma Engine #

Pragma provides periodic updates to the engine, infrastructure, and SDK.

Prerequisites:
You’ll need to have cloned pragma-engine-release.

Follow these steps to upgrade to the latest Pragma Engine version.

  1. Run git fetch --all and then git pull on main from pragmaplatform/pragma-engine-release.
  2. Run git format-patch [current version]..[latest version] to generate a patch file. For example, to go from version 0.0.100 to 0.1.0 you would run:
    git format-patch 0.0.100..0.1.0
    
    This creates a separate patch file for each upgrade to the next version. In this example it would be:
    0001-Updating-to-Pragma-to-0.0.101.patch
    0002-Updating-Pragma-to-0.1.0.patch
    
  3. Navigate to the parent folder of the Pragma engine by running for example,
    cd ../studio-game-pragma-engine
    
  4. Create a new branch for the release integration work:
    git checkout -b pragma-release-[version]
    
  5. Run git apply -3 --directory pragma-engine < [path to patch file]/[patch-file-name] to apply the patches created in step 2. For example, to go from version 0.0.100 to 0.1.0 you would run:
    git apply -3 --directory pragma-engine < ../0001-Updating-to-Pragma-to-0.0.101.patch
    git apply -3 --directory pragma-engine < ../0002-Updating-Pragma-to-0.1.0.patch
    
  6. Address any merge conflicts caused by engine modifications. We recommend using IntelliJ IDEA’s tooling to resolve Git conflicts.
  7. Review and resolve any required release integrations described in the release notes.
  8. Build and test the updated Pragma Engine.
  9. Merge the branch back to main.

Update the Pragma SDK #

The Pragma SDK is in the pragmaplatform/pragma-engine-release/sdk directory and contains the Unity and Unreal Engine SDK. The Unreal Engine and Unity SDK directories contain an update-pragma-sdk.sh script that automates the process of replacing the SDK in your game repository. During onboarding this script is set up for your repository and is ready for you to use. Run this script after you update your platform repository to get the latest SDK. If you build custom services or modifyext protos, run this script to retrieve generated types for your SDK.

This script deletes the SDK and replaces it with the SDK in the platform repo. This guarantees any deletions from Pragma make it into your SDK as well. If you want to make changes to the SDK, you’ll need to account for this.