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. Pull the latest tagged release 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.1.0 to 0.2.0 you would run:

    git format-patch 0.1.0..0.2.0
    

    This creates a separate patch file for each intermediate upgrade between your current version and the version you’re upgrading to. In this example, we are only upgrading by one release:

    0001-Updating-Pragma-to-0.2.0.patch
    

    If, for example, you’re upgrading from 0.0.101 to 0.2.0, two patch files would be generated:

    0001-Updating-to-Pragma-to-0.1.0.patch
    0002-Updating-Pragma-to-0.2.0.patch
    
  3. Navigate to your Pragma repo. 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] for each bash file created in step 2. For example, to go from version 0.1.0 to 0.2.0 you would run:

    git apply -3 --directory pragma-engine < ../0001-Updating-to-Pragma-to-0.2.0.patch
    

    To go from version 0.0.101 to 0.2.0 you would run:

    git apply -3 --directory pragma-engine < ../0001-Updating-to-Pragma-to-0.1.0.patch
    git apply -3 --directory pragma-engine < ../0002-Updating-Pragma-to-0.2.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.