Continuous Integration with lgputil
lgputil
is a CLI tool to make continuous integration easier for developers on Link Game platform. This guide will walk you through how to start using the CLI in a game project.
Prerequisites
- Node.js > 10 should be installed on the machine
First time setup
You'll need an organizational API token to use with lgputil
, API token can be created by organization administrators from the API token tab in the admin screen on developer console.
Assuming you've already got your token, next step you'll need to install the lgputil
, run the following command in your project directory.
$ npm i -D lgputil
+ lgputil@1.0.1
Verify installation and setup
Check if your setup by running the following line, you should see a list of games if correctly set up.
$ npx lgputil game list --org YOUR_ORGANIZATION_ID --token YOUR_ORGANIZATIONAL_API_TOKEN
name id
----- -----
1. Some game A SOME_GAME_ID_1
2. Some game B SOME_GAME_ID_2
If you don't like assign --org
and --token
every time you use, you can store it on the machine by:
$ npx lgputil config set org YOUR_ORGANIZATION_ID
Success
$ npx lgputil config set token YOUR_ORGANIZATIONAL_API_TOKEN
Success
$ npx lgputil game list
name id
----- -----
1. Some game A SOME_GAME_ID_1
2. Some game B SOME_GAME_ID_2
Showcases
Here're some common use cases. (make sure replace YOUR_GAME_ID
and PATH/TO/FILE.zip
with actual values)
$ # Create a new version
$ npx lgputil game upload YOUR_GAME_ID YOUR/PATH/TO/FILE.zip
Uploading... [========================================] 100% | 123908/123908
Processing...
Upload successfully to version 100
$ # Deploy a version
$ npx lgputil game deploy YOUR_GAME_ID 100
Deploy successfully
$ # Create a version with comment and deploy immediately
$ npx lgputil game upload YOUR_GAME_ID YOUR/PATH/TO/FILE.zip --comment "Your comment" --output json | jq ".number" | xargs -I{} npx lgputil game deploy YOUR_GAME_ID {}
Deploy successfully
Needs Support?
Please feel free to create issues on https://github.com/rakuten-games/lgputil/issues