Deploying Changes - RLBot/RLBot GitHub Wiki

NOTE: This page is for people working on RLBot. If you are only interested in making bots, this page does not concern you.

The RLBot framework has a presence in several package repositories, e.g. PyPI for Python, bintray for Java, and NuGet for .NET. Publishing to these repositories helps create a seamless experience for bot makers.

Publishing Python to PyPI

This is the most important one, because it affects all bot makers regardless of their language of choice. This includes changes to the DLLs, the GUI, and all Python framework code. When you push a change to PyPI, everybody will get it automatically the next time they run one of their .bat files, so it's important that your changes not break any bot code or config files that were previously working.

First time setup

Create a .pypirc file in your home directory, e.g. C:\Users\Tyler\.pypirc. You'll need the password. See the sample file below. You can also read the documentation.

[distutils]
index-servers =
  pypi
  pypitest

[pypi]
username=RLBotOfficial
password=****

[pypitest]
repository=https://test.pypi.org/legacy/
username=RLBotOfficial
password=****

Preparing the closed source branch

RLBot currently has:

  • A private, closed source git branch with a complete version of the code.
  • A public, open source git branch that has certain files and folders redacted.

Currently when deploying, we always use the private branch because it tends to be more up-to-date. Also, deploying from the public branch hasn't been tested in years.

So, check out the private closed source branch!

Cherry picking changes from the public branch

These days, most changes come from pull requests on the public branch. The easiest way to handle this is:

  1. Approve and merge the pull request into the public branch.
  2. git pull the public branch to get the change locally.
  3. git cherry-pick the change onto the private branch.

Updating the version and release notes

Version and release notes are specified in https://github.com/RLBot/RLBot/blob/master/src/main/python/rlbot/version.py. The version number should be one higher than the version shown at https://pypi.org/project/rlbot/. When adding release notes, you can keep the old ones and just add a new entry keyed by the appropriate version number.

Testing the update

You can skip this step if you're confident.

  1. Open a terminal in the root directory and run publish-to-pypi-test.bat.
  2. Verify that the new version appeared at https://test.pypi.org/project/rlbot/
  3. Run pip uninstall rlbot and then pip install --index-url https://test.pypi.org/simple/ rlbot
  4. Verify that this version of rlbot works using a dummy project.

Pushing the update

Open a terminal in the root directory and run publish-to-pypi-prod.bat.

Publishing Java to bintray

First time setup

  1. First, set up the prerequisites for running Gradle:
    1. Make sure you've installed the Java 8 JDK. Please use Java 8 here rather than something newer; I believe it's better for compatibility.
    2. Make sure you've set the JAVA_HOME environment variable.
  2. Next, create a local.properties file in the root directory of RLBot. The entire contents of the file will be just bintray.apikey=****. To get the API key:
    1. Go to https://bintray.com/
    2. Sign in with Google. Use the RLBotOfficial Google account.
    3. Visit https://bintray.com/profile/edit/organizations, click "API Key", and click "Show".

Preparing the metadata

Metadata for the package is specified in https://github.com/RLBot/RLBot/blob/master/build.gradle. Most importantly, you need to increment the version number. Look for project.setVersion('...'). The version should be 1 higher than what is shown at https://bintray.com/rlbotofficial/RLBotMaven/rlbot-framework.

Testing the update

You can skip this step if you're confident.

  1. Open a terminal in the root directory and run gradlew.bat publishToMavenLocal.
  2. Go look at the files in ~\.m2\repository\org\rlbot\commons\framework.
  3. Verify that this version of rlbot works using a dummy project pointed at the mavenLocal() repository.

Pushing the update

  1. Open a terminal in the root directory and run gradlew.bat bintrayUpload.
  2. Visit https://bintray.com/rlbotofficial/RLBotMaven/rlbot-framework, log in, and click the "Publish" link.

Publishing .NET to NuGet

RLBotDotNet is available on NuGet at https://www.nuget.org/packages/RLBot.Framework.

To publish new versions there:

  1. Install the NuGet CLI: https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools#nugetexe-cli.
    • Put the exe on your PATH.
  2. Modify AssemblyInfo.cs to have an incremented version number.
  3. Modify RLBotDotNet.nuspec to update the release notes, etc.
  4. Make sure RLBotDotNet has been built with the Release configuration, on the "Any CPU" platform.
  5. Open a terminal and go to the RLBotDotNet folder (the one that contains RLBotDotNet.csproj).
  6. Run nuget pack .\RLBotDotNet.csproj -Prop Configuration=Release
    • This should create a file like RLBot.Framework.0.0.1.nupkg.
  7. Go to https://www.nuget.org/packages/manage/upload and log in with our rlbotofficial account.
  8. Upload the nupkg file.