This repo houses the CLI that can be used to deploy your game server builds to Hathora Cloud in your CI/CD pipelines.
For documentation on how to use this CLI, check out our docs.
To run the CLI locally, execute the following:
go run hathora/main.go --help
To run tests:
make test
To build a CLI binary, you can run the following:
make build
The target OS and architecture can be specified by setting the OS
and ARCH
environment variables, respectively. For example, to build a binary for the linux
OS and the amd64
architecture, you can do the following:
TARGETOS=linux TARGETARCH=amd64 make build
Note
When building on windows you'll want the built binaries to include the .exe
suffix. To achieve this, you can use the BINARY_SUFFIX
variable, e.g.:
TARGETOS=windows TARGETARCH=amd64 BINARY_SUFFIX=.exe make build
The binary will be available in the bin
directory.
./bin/hathora-* --help
To quickly rebuild a CLI binary, you can use:
make clean && make build
The SDK can be regenerated based on the OpenAPI spec hosted at https://hathora.dev/swagger.json
. To do this, run the following command from the root of the project. You must have the speakeasy CLI installed.
make sdk-clean