A command to deploy your apps to several mobile app distribution services. The motivation of splitter is to encourage Mobile App Deployment as Code.
// for internal dogfooding
splitter deploy -f path/to/aab -n dogfooding
// for pull request
splitter deploy -f path/to/aab -n pull-request
// for design reviews
splitter deploy -f path/to/aab -n design-reviewPlease download the latest binary from GitHub Release. The following code may be useful.
version=<latest version>
# for windows
curl -sL -o "splitter.zip" \
"https://github.com/jmatsu/splitter/releases/download/$version/splitter_$(uname -s)_$(uname -m).zip"
unzip splitter.zip
./spliter -h
# for linux or macOS
curl -sL -o "splitter.tar" \
"https://github.com/jmatsu/splitter/releases/download/$version/splitter_$(uname -s)_$(uname -m).tar.gz"
tar -xf splitter.tar
./spliter -hsplitter allows you to manage deployment configuration as Code. This feature makes you focus on defining deployments.
USAGE:
splitter deploy [options]
OPTIONS:
--name string, -n string deployment name in your configuration file. [$SPLITTER_DEPLOYMENT_NAME]
--source-path string, -f string A path to an app file.
--release-note string An release note of this revision. Some of services may not support this option. [$SPLITTER_DEPLOYMENT_RELEASE_NOTE]
Please check splitter.document.yml and examples/splitter.yml as well.
Required
app-owner-nameapi-token
https://github.com/jmatsu/splitter/blob/main/internal/config/deploygate_config.go
Required
app-idaccess-tokenorcredentials-path
https://github.com/jmatsu/splitter/blob/main/internal/config/firebase_app_distribution_config.go
Required
destination-path
https://github.com/jmatsu/splitter/blob/main/internal/config/local_config.go
Required
auth-token
https://github.com/jmatsu/splitter/blob/main/internal/config/custom_service_config.go
splitter provides commands specified for deployment to each service. This mode doesn't use deployments configuration in the config file.
These commands may accept finer-grained options than the configuration-based command.
DeployGate - https://deploygate.com/
The minimum behaviour just creates new releases, but you can create and/or Distribution.
USAGE:
splitter deploygate [options]
OPTIONS:
--app-owner-name string, -n string User name or Organization name. [$DEPLOYGATE_APP_OWNER_NAME]
--api-token string, -t string The api token of the app owner. [$DEPLOYGATE_API_TOKEN]
--source-path string, -f string A path to an app file.
--message string, -m string A short message of this revision.
--distribution-access-key string An access key of a distribution that must exist. If the both of key and name are specified, key takes priority.
--distribution-name string An name (title) of a distribution that does not have to exist. If the both of key and name are specified, key takes priority.
--distribution-release-note string An release note of this revision that will be available only while being distributed via the specified distribution.
--disable-ios-notification Specify this file if you would like to disable notifications for iOS.
Firebase App Distribution - https://firebase.google.com/docs/app-distribution
The minimum behaviour just creates new releases, but you can update release notes and distribute to specific groups.
USAGE:
splitter firebase-app-distribution [options]
OPTIONS:
--app-id string Firebase App ID. e.g. 1:123456578:android:xxxxxxx [$FIREBASE_APP_ID]
--source-path string, -f string A path to an app file.
--access-token string, -t string The access token to use for this distribution. [$FIREBASE_CLI_TOKEN]
--credentials string A path to a credentials json file.
--release-note string An release note of this revision.
--group-aliases string Aliases of groups. Separate multiple aliases by commas.
--tester-emails string Emails of testers. Separate multiple aliases by commas.
To get your access token, we recommend https://github.com/google/oauth2l.
Your local file system.
USAGE:
splitter local [options]
OPTIONS:
--source-path string, -f string A source path to an app file.
--destination-path string A destination path to an app file.
--delete-source Specify true if you would not like to keep the source file.
--overwrite Specify true if you allow to overwrite the existing destination file.
--file-mode uint The final file permission of the destination path. (default: Same to the source)
service command does this. You can distribute your apps to the defined service in the config file.
USAGE:
splitter service [options]
OPTIONS:
--source-path string, -f string A path to an app file.
--auth-token string, -t string The auth token to use for this distribution.
--name string, -n string A service name in the config file.
--header string [ --header string ] Append <key>=<value> to headers
--query-param string [ --query-param string ] Append <key>=<value> to query parameters
--form-param string [ --form-param string ] Append <key>=<value> to form parameters
Every successful deployment, whether configuration-based or on-demand, is dumped into .splitter-dist/<run-name>/<name>.json so that the following commands in your sequence can consume it without parsing the stdout.
<run-name>is a UTC timestamp such as20240101T091500Zunless--run-nameis given.<name>is a deployment name of the configuration-based command, otherwise a service name.
splitter deploy -n pull-request -f path/to/apk --run-name "pr-${GITHUB_PULL_NUMBER}"
install_url=$(jq -r '.release.install_url' ".splitter-dist/pr-${GITHUB_PULL_NUMBER}/pull-request.json")OPTIONS:
--dist-dir string A base directory that deployment results are dumped into. (default: .splitter-dist) [$SPLITTER_DIST_DIR]
--run-name string A directory name of this execution under the dist directory. (default: the current timestamp) [$SPLITTER_RUN_NAME]
dist-dir is also configurable in your config file.
app and release are the normalized view of a response. Every field of them is nullable because no service exposes all of them. values is the parsed response of the service and raw is the response as-is.
{
"service": "deploygate",
"deployment": "pull-request",
"run_name": "pr-1234",
"deployed_at": "2024-01-01T09:15:00Z",
"source_file_path": "path/to/apk",
"app": {
"name": "Example",
"identifier": "com.example",
"os": "android",
"version_name": "1.0",
"version_code": "1"
},
"release": {
"install_url": "https://deploygate.com/distributions/xxxxx",
"download_url": "https://deploygate.com/xxxxx",
"destination_path": null,
"release_note": "a release note"
},
"values": {},
"raw": {}
}- DeployGate - https://deploygate.com/
- Firebase App Distribution - https://firebase.google.com/docs/app-distribution
- Local - Your local file system.
splitter is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
