Update Pragma Engine #
Pragma provides periodic updates to the engine, infrastructure, and SDK.
Prerequisites:
You’ll need to have clonedpragma-engine-release
.
Follow these steps to upgrade to the latest Pragma Engine version.
- Run
git fetch --all
and thengit pull
on main from pragmaplatform/pragma-engine-release. - 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:This creates a separate patch file for each upgrade to the next version. In this example it would be:git format-patch 0.0.100..0.1.0
0001-Updating-to-Pragma-to-0.0.101.patch 0002-Updating-Pragma-to-0.1.0.patch
- Navigate to the parent folder of the Pragma engine by running for example,
cd ../studio-game-pragma-engine
- Create a new branch for the release integration work:
git checkout -b pragma-release-[version]
- 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
- Address any merge conflicts caused by engine modifications. We recommend using IntelliJ IDEA’s tooling to resolve Git conflicts.
- Review and resolve any required release integrations described in the release notes.
- Build and test the updated Pragma Engine.
- 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.