What are Command-Line Tools?
PatchKit Command-Line Tools allow you to manage your applications from a command-line interface. This set of tools enables you to:
- Query information about your applications and versions
- Create new applications and versions
- Upload new version files
- Monitor the progress of new version processing
- Publish new versions
Using the tools provides two key benefits:
- Automation - for example, in the context of continuous integration or delivery.
- Faster uploads - you can upload locally computed binary differences instead of all application files.
Not all PatchKit plans include API access, which is required for the Command-Line Tools to work. To check if your account has API access, please visit your Account page.
To install the PatchKit Command-Line Tools, follow these steps:
- Download the latest version of the tools that matches your operating system from GitHub.
- Unzip the file to a directory of your choice. We recommend
C:\patchkit_toolson Windows and
/opt/patchkit_toolson OS X and Linux.
- Run the
StartToolsfile on Windows or by
patchkit-toolson OSX and Linux.
To upgrade (or downgrade) the tools to a different version, follow these steps:
- Remove the previous installation directory.
- Unzip the newly downloaded distribution from GitHub to the same location.
To effectively use PatchKit, it’s important to have a basic understanding of the command line, whether it be Windows’ command line, Mac OSX’s Terminal, or Linux’s Terminal. Here are some resources to help you get started:
To use PatchKit’s tools, simply enter the following in the command line:
patchkit-tools tool-name [options,...]
To view a list of all available tools, run:
For specific information on a particular tool, such as the
make-version tool, use the following command:
patchkit-tools make-version --help
Note that many of PatchKit’s tools require you to provide an API key. You can find your API key on your account page.
Deploying an Application
To deploy an application with PatchKit, use the
make-version tool. This tool lets you create a new version of your application and upload the relevant files. Here’s how you can use it:
make-version tool will prompt you for the following information:
- API key: your unique API key for accessing PatchKit services
- Application secret: the secret code associated with the specific application you want to deploy
- Version label: the name of the new version you’re creating
- Path to the files: the location of the directory that contains the files you want to upload
Please ensure that the directory you specify only contains the files you want to upload. The
make-version tool will automatically upload all files in the directory.
You can also provide this information as command-line arguments, like so:
patchkit-tools make-version -f C:\my_game -a API_KEY -s APP_SECRET -l 1.0
If you want to publish the version automatically after the upload is complete, you can use the
-p argument. Note that the publishing process will be cancelled if the upload or processing fails.
Working with Channels
To work with channels, you need to follow the channels flow outlined in the Channels section.
First, use the
make-version tool to upload and publish a group version. Remember to provide your group secret as the application secret, which you can find on your group’s page.
Next, use the
channel-make-version tool to link the group version to a channel. The command is as follows:
patchkit-tools channel-make-version -a API_KEY -s CHANNEL_SECRET -l 1.0 --group-version GROUP_VERSION_ID
GROUP_VERSION_ID is the ID of the group version you want to link to the channel, created in the previous step.
You can also use the
channel-make-version tool in your continuous integration system to automatically link the latest group version to a channel. Just use the
--latest-group-version argument, and the tool will find the most recent group version and link it to the channel for you.