Tools

PatchKit Tools is a set of scripts that can be used to access PatchKit capabilities from the command line. With PatchKit Tools you can:

The most important PatchKit tools feature is the ability to upload & publish newly created version at once. For this task you can use patchkit-tools make-version command with or without parameters.

Installation

PatchKit Tools require Ruby installation. Remember to check “Add Ruby executables to your “PATH” during the installation.

To install PatchKit Tools you need to download the package from GitHub, unzip it and add the root location to the PATH variable (Linux/Windows)

Then you need to install required gems. Open console and start with

gem install bundler

Then go to the repository patchkit-tools/src folder and perform

bundler install

In case of certificate failure

Trying to install the bundler, some users may encounter SSL certificate failure. In this case we’d suggest you to download this certificate file (cacert.pem) and put it in any directory (eg. C:\RailsInstaller\cacert.pem). Then open a command line and type:

set SSL_CERT_FILE=C:\RailsInstaller\cacert.pem

This will assign the certificate and will allow you to download all the necessary assets. The certificate will remain assigned until the current terminal session is closed.

Usage

Every tool is started by patchkit-tools command. The working directory is set to the location from which the script was called.

Syntax

patchkit-tools [tool_name] [tool_arguments]

Displaying help and tools list

patchkit-tools --help

Displaying specific tool help

patchkit-tools [tool_name] --help

NOTE! The patchkit-tools commands have no tools for creating an application directly from the command line, so in order to create the application, please follow the steps in Create the application paragraph in the Getting Started section.

Uploading application version with tools

make-version tool allows you to create a new version of your project by uploading only the diff files. It means you don’t have to upload the whole new version of your project to PatchKit. If make-version is executed for uploading the very first version of the project, then the whole project content will be uploaded.

make-version syntax

patchkit-tools make-version [-s secret] [-a api_key] [-l label] [-f files] [-c changelog]

make-version examples

Adding new version

patchkit-tools make-version -s aa11bb22cc33dd55ee66ff77gg88hh99 -a zz99yy88xx77ww66vv55uu44tt33ss22rr11 -l "Second version" -f BuildFolder

Adding new version and assigning the changelog

patchkit-tools make-version -s aa11bb22cc33dd55ee66ff77gg88hh99 -a zz99yy88xx77ww66vv55uu44tt33ss22rr11 -l "Third version" -f BuildFolder -c "-feature 1\n-feature 2"

Type patchkit-tools make-version --help to learn syntax.

Copyright © 2015 - 2017 Upsoft
All Rights Reserved.