@getik-public/cli
v2.1.1
Published
Getik CLI
Readme
Getik CLI
@getik-public/cli is a collection of scripts meant to ease the development flow. For available scripts read further.
How to use the cli
Add next line in your package.json file under devDependencies:"@getik-public/cli": "X.Y.Z" or simply run npm i @getik-public/cli@latest --save-dev.
Available scripts
mobile-build
Usage: getik-cli mobile-build [-p, --platform] [-e, --environment] [--syncOnly] [--releaseTesting] [--aab] [--upload]
Example: getik-cli mobile-build -p android -e getikDebug --syncOnly
Example: getik-cli mobile-build --platform ios --environment getik --upload
| Option | Required | Values | Description |
|---------------------|----------|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| -p, --platform | NO | android, ios | Platform to build for. |
| -e, --environment | YES | <string>, <string>Debug | While environment can be any name, be consistent and use these: getik, vbox, qa, prod. Every environment must have a pair for debug build, so have these environments also defined: getikDebug, vboxDebug, qaDebug, prodDebug |
| --syncOnly | NO | - | For development only, if you need to apply javascript build, or a new plugin was added. This will not go further to trigger an android or ios build script. If --platform missing it will run cap sync for all platforms. |
| --aab | NO | - | For --platform android only. Build aab file instead of apk file. |
| --upload | NO | - | For --platform ios only. Instant upload to store after build, if successful. |
| --releaseTesting | NO | - | For --platform ios only. Will apply *-export-options.testing.plist file instead of *-export-options.plist. |
flutter-build
Usage: getik-cli flutter-build [-p, --platform] [-e, --environment] [--releaseTesting] [--aab] [--upload]
Example: getik-cli flutter-build -p android -e getikDebug
Example: getik-cli flutter-build --platform ios --environment getik --upload
| Option | Required | Values | Description |
|---------------------|----------|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| -p, --platform | YES | android, ios | Platform to build for. |
| -e, --environment | YES | <string>, <string>Debug | While environment can be any name, be consistent and use these: getik, vbox, qa, prod. Every environment must have a pair for debug build, so have these environments also defined: getikDebug, vboxDebug, qaDebug, prodDebug |
| --aab | NO | - | For --platform android only. Build aab file instead of apk file. |
| --upload | NO | - | For --platform ios only. Instant upload to store after build, if successful. |
| --releaseTesting | NO | - | For --platform ios only. Will apply *-export-options.testing.plist file instead of *-export-options.plist. |
web-build
Usage: getik-cli web-build [-e, --environment] [--syncOnly]
Example: getik-cli web-build -e getik --syncOnly
Example: getik-cli web-build -e getik
| Option | Required | Values | Description |
|-----------------------|----------|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| -e, --environment | YES | <string> | While environment can be any name, be consistent and use these: getik, vbox, qa, preprod, prod. |
| --syncOnly | NO | - | For development only, it will create a file named version.ts with version found in package.json. Use this version in all environment.ts files. This will not go further to trigger the actual build script. |
| --includeDemo | NO | - | Use this flag to also include the demo build variant for the selected environment. |
| --includeFallback | NO | - | Use this flag to also include the fallback build variant for the selected environment. |
upload-to-cloud
Usage: getik-cli upload-to-cloud ./path/to/my-file.apk --host awesome.host.net --useCommitHash
Use this command to upload apk files to cloud. If successful, in command line you will find a direct link to fresh uploaded file alongside a link to the full list.
Run this command from the root of the project, as it tries to look for project name in package.json file. Project name will be used as file name.
| Option | Required | Values | Description |
|-------------------|----------|-----------------------------|-----------------------------------------------------------------|
| --host | YES | <string> | Provide host where to upload files. |
| --useCommitHash | NO | - | Use this option if git hash needs to be added to the file name. |
git-status
Usage: getik-cli git-status [--host jira.host.net] [--local]
This command will generate a table with status between "master, release, develop" branches. It will provide steps to follow if rebase is required. It will generate a list with current and future release notes excluding version update commits.
| Option | Required | Values | Description |
|-----------|----------|-----------------------------|--------------------------------------------------------------------------------------------------------------|
| --host | NO | <string> | Provide host, it will be used for concatenation in release notes report. |
| --local | NO | - | This flag indicates to read local branches instead of remote branches. By default, remote branches are used. |
increment-version
Usage: getik-cli increment-version [--patch] [--release] [--major]
This command will create a version update commit message.
| Option | Required | Values | Description |
|-------------|----------|--------|------------------------------------------------------------|
| --patch | NO | - | Will increase last number in version. Ex: 3.1.3 -> 3.1.4 |
| --release | NO | - | Will increase middle number in version. Ex: 3.1.3 -> 3.2.0 |
| --major | NO | - | Will increase firs number in version. Ex: 3.1.3 -> 4.0.0 |
