├── .gitignore ├── sample-apps ├── sample-app.apk └── sample-app.ipa ├── macos ├── config.json └── install.sh ├── windows └── config.json ├── linux ├── config.json └── install.sh ├── install.sh └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | build/ 3 | -------------------------------------------------------------------------------- /sample-apps/sample-app.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/testappio/cli/HEAD/sample-apps/sample-app.apk -------------------------------------------------------------------------------- /sample-apps/sample-app.ipa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/testappio/cli/HEAD/sample-apps/sample-app.ipa -------------------------------------------------------------------------------- /macos/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "api_token": "Your API Token", 3 | "app_id": "Your App ID", 4 | "release": "both", 5 | "apk": "/path/to/android/app.apk", 6 | "ipa": "/path/to/ios/app.ipa", 7 | "git_release_notes": true, 8 | "git_commit_id": false, 9 | "archive_latest_release": false, 10 | "notify": true 11 | } 12 | -------------------------------------------------------------------------------- /windows/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "api_token": "Your API Token", 3 | "app_id": "Your App ID", 4 | "release": "both", 5 | "apk": "/path/to/android/app.apk", 6 | "ipa": "/path/to/ios/app.ipa", 7 | "git_release_notes": true, 8 | "git_commit_id": false, 9 | "archive_latest_release": false, 10 | "notify": true 11 | } 12 | -------------------------------------------------------------------------------- /linux/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "api_token": "Your API Token", 3 | "app_id": "Your App ID", 4 | "release": "both", 5 | "apk": "/path/to/android/app.apk", 6 | "ipa": "/path/to/ios/app.ipa", 7 | "release_notes": "", 8 | "git_release_notes": true, 9 | "git_commit_id": false, 10 | "archive_latest_release": false, 11 | "notify": true 12 | } 13 | -------------------------------------------------------------------------------- /linux/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if ! [ -x "$(command -v unzip)" ]; then 4 | echo 'Error: unzip command is not installed' >&2 5 | exit 1 6 | fi 7 | 8 | curl -LO https://github.com/testappio/cli/releases/latest/download/ta-cli_linux.zip 9 | 10 | unzip ta-cli_linux.zip 11 | rm -rf ta-cli_linux.zip 12 | 13 | chmod +x ta-cli_linux/ta-cli 14 | 15 | INSTALL_PATH=/usr/local/bin/ta-cli 16 | 17 | mv ta-cli_linux/ta-cli $INSTALL_PATH 18 | 19 | if ! [ $? -eq 0 ]; then 20 | echo "Failed to copy to $INSTALL_PATH - please use sudo with this command or contact us for more help" 21 | rm -rf ta-cli_linux 22 | exit 1 23 | fi 24 | 25 | rm -rf ta-cli_linux 26 | rm -rf install_ta_cli.sh 27 | 28 | echo 29 | echo 'Running ta-cli config' 30 | 31 | ta-cli config 32 | 33 | echo "ta-cli successfully installed in $INSTALL_PATH" 34 | -------------------------------------------------------------------------------- /macos/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if ! curl -sL --fail https://google.com -o /dev/null; then 4 | echo 'Error: curl command is not installed' >&2 5 | exit 1 6 | fi 7 | 8 | if ! [ -x "$(command -v unzip)" ]; then 9 | echo 'Error: unzip command is not installed' >&2 10 | exit 1 11 | fi 12 | 13 | curl -LO https://github.com/testappio/cli/releases/latest/download/ta-cli_macos.zip 14 | 15 | unzip ta-cli_macos.zip 16 | if ! [ $? -eq 0 ]; then 17 | echo 18 | echo "Failed to download the ta-cli. Please check our documentation at https://github.com/testappio/cli" 19 | echo 20 | rm -rf ta-cli_macos.zip 21 | exit 1 22 | fi 23 | 24 | rm -rf ta-cli_macos.zip 25 | 26 | # If the install directory is not set, set it to a default 27 | if [ -z ${INSTALL_DIR+x} ]; then 28 | INSTALL_DIR=/usr/local/bin 29 | fi 30 | if [ -z ${INSTALL_PATH+x} ]; then 31 | INSTALL_PATH="${INSTALL_DIR}/ta-cli" 32 | fi 33 | 34 | mv ta-cli_macos/ta-cli $INSTALL_PATH 35 | if ! [ $? -eq 0 ]; then 36 | echo "Failed to copy to $INSTALL_PATH - please use sudo with this command or contact us for more help" 37 | rm -rf ta-cli_macos 38 | exit 1 39 | fi 40 | 41 | rm -rf ta-cli_macos 42 | 43 | echo 44 | ta-cli -h 45 | 46 | echo 47 | echo "ta-cli successfully installed in $INSTALL_PATH" 48 | 49 | echo 50 | echo '🎉 You can now run ta-cli config' 51 | echo 52 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | 4 | # allow overriding the version 5 | VERSION="1.10.2" 6 | 7 | PLATFORM=$(uname -s) 8 | ARCH=$(uname -m) 9 | 10 | if [[ $PLATFORM == CYGWIN* ]] || [[ $PLATFORM == MINGW* ]] || [[ $PLATFORM == MSYS* ]]; then 11 | PLATFORM="Windows" 12 | fi 13 | 14 | if [[ $PLATFORM == "Darwin" ]]; then 15 | if [[ $ARCH == aarch64* ]]; then 16 | ARCH="arm64" 17 | elif [[ $ARCH == x86_64* ]] || [[ $ARCH == amd64* ]]; then 18 | ARCH="x86_64" 19 | else 20 | ARCH="universal" 21 | fi 22 | fi 23 | 24 | if [[ $ARCH == armv8* ]] || [[ $ARCH == arm64* ]] || [[ $ARCH == aarch64* ]]; then 25 | ARCH="aarch64" 26 | fi 27 | 28 | if [[ $ARCH == armv6* ]] || [[ $ARCH == armv7* ]]; then 29 | ARCH="armv7" 30 | fi 31 | 32 | # If the install directory is not set, set it to a default 33 | if [ -z ${INSTALL_DIR+x} ]; then 34 | INSTALL_DIR=/usr/local/bin 35 | fi 36 | if [ -z ${INSTALL_PATH+x} ]; then 37 | INSTALL_PATH="${INSTALL_DIR}/ta-cli" 38 | fi 39 | 40 | DOWNLOAD_URL="https://github.com/testappio/cli/releases/download/v${VERSION}/ta-cli-${PLATFORM}-${ARCH}" 41 | 42 | echo "This script will automatically install ta-cli (${VERSION}) for you." 43 | echo "Installation path: ${INSTALL_PATH}" 44 | if [ "x$(id -u)" == "x0" ]; then 45 | echo "Warning: this script is currently running as root. This is dangerous. " 46 | echo " Instead run it as normal user. We will sudo as needed." 47 | fi 48 | 49 | # if [ -f "$INSTALL_PATH" ]; then 50 | # echo "error: ta-cli is already installed." 51 | # echo " run \"ta-cli update\" to update to latest version" 52 | # exit 1 53 | # fi 54 | 55 | if ! hash curl 2>/dev/null; then 56 | echo "error: you do not have 'curl' installed which is required for this script." 57 | exit 1 58 | fi 59 | 60 | TEMP_FILE=$(mktemp "${TMPDIR:-/tmp}/.tacli.XXXXXXXX") 61 | TEMP_HEADER_FILE=$(mktemp "${TMPDIR:-/tmp}/.tacli-headers.XXXXXXXX") 62 | 63 | cleanup() { 64 | rm -f "$TEMP_FILE" 65 | rm -f "$TEMP_HEADER_FILE" 66 | } 67 | 68 | trap cleanup EXIT 69 | HTTP_CODE=$(curl -SL --progress-bar "$DOWNLOAD_URL" -D "$TEMP_HEADER_FILE" --output "$TEMP_FILE" --write-out "%{http_code}") 70 | if [[ ${HTTP_CODE} -lt 200 || ${HTTP_CODE} -gt 299 ]]; then 71 | echo "error: your platform and architecture (${PLATFORM}-${ARCH}) is unsupported. Please contact us to support it for you." 72 | exit 1 73 | fi 74 | 75 | chmod 0755 "$TEMP_FILE" 76 | if ! mv "$TEMP_FILE" "$INSTALL_PATH" 2>/dev/null; then 77 | sudo -k mv "$TEMP_FILE" "$INSTALL_PATH" 78 | fi 79 | 80 | echo 81 | echo "ta-cli successfully installed in $INSTALL_PATH $("$INSTALL_PATH" version)" 82 | echo 83 | 84 | echo 85 | echo "You can now run ta-cli config" 86 | echo 87 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [TestApp.io](https://testapp.io/) CLI 2 | 3 | > BETA mode. Your feedback is highly appreciated! 4 | 5 | Official CLI (ta-CLI) for [TestApp.io](https://testapp.io) app distribution to upload your Android (APK) and iOS (IPA) directly from this command line and notify your team members to install and share feedback. 6 | 7 | ![TA-CLI Screenshot](https://user-images.githubusercontent.com/3076722/120862504-1f8e7f80-c59a-11eb-93ca-71f677855020.png) 8 | 9 | ## Installation 10 | 11 | #### macOS & Linux 12 | 13 | ```sh 14 | curl -Ls https://github.com/testappio/cli/releases/latest/download/install | bash 15 | ``` 16 | 17 | #### Windows 18 | 19 | Currently, we are not supporting `ta-cli config` for Windows. 20 | 21 | Download latest [windows release](https://github.com/testappio/cli/releases/latest) 22 | 23 | ```sh 24 | ta-cli.exe publish --api_token=[Your API Token] --app_id=[Your AppID] --release=android --apk=C:/path/to/app.apk 25 | ``` 26 | 27 | **OR using the config JSON:** 28 | 29 | 1. Create the config file in `$HOME/.ta-cli.json` and add the following: 30 | 31 | You can use `vim` if installed `vim $HOME/.ta-cli.json` 32 | 33 | ```json 34 | { 35 | "api_token": "Your API Token", 36 | "app_id": "Your App ID", 37 | "release": "both", 38 | "apk": "/user/path/to/android/app.apk", 39 | "ipa": "/user/path/to/ios/app.ipa", 40 | "release_notes": "", 41 | "git_release_notes": true, 42 | "git_commit_id": false, 43 | "archive_latest_release": false, 44 | "notify": true 45 | } 46 | ``` 47 | 48 | 2. From your terminal, navigate to the extracted folder 49 | 50 | ```sh 51 | ta-cli.exe publish 52 | ``` 53 | 54 | #### Direct command 55 | 56 | Navigate to [latest releases](https://github.com/testappio/cli/releases) and download the zip file relative to your OS to run the command `./ta-cli` or `./ta-cli.exe` directly without adding it to the OS binary folder. 57 | 58 | ## Configuration 59 | 60 | ```sh 61 | ta-cli config 62 | ``` 63 | 64 | | Key | Description | Default | 65 | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | 66 | | --config | path to your ta-cli.json config file [Optional] | $HOME/.ta-cli.json | 67 | | --api_token | You can get it from https://portal.testapp.io/settings/api-credentials | | 68 | | --app_id | You can get it from your app page at [https://portal.testapp.io/apps](https://portal.testapp.io/apps?to=app-integrations&tab=releases) | | 69 | | --release | It can be either both or Android or iOS | | 70 | | --apk_file | Path to the Android APK file | | 71 | | --ipa_file | Path to the iOS IPA file | | 72 | | --release_notes | Manually add the release notes to be displayed for the testers | | 73 | | --git_release_notes | Collect release notes from the latest git commit message to be displayed for the testers | false | 74 | | --git_commit_id | Include the last commit ID in the release notes (works with both release notes options) | false | 75 | | --notify | Send notifications to your team members about this release | false | 76 | | --archive_latest_release | Automatically archive the current latest release upon successful upload | false | 77 | 78 | The default configuration file will be at `$HOME/.ta-cli.json` 79 | 80 | ## Publish 81 | 82 | ```sh 83 | ta-cli publish 84 | ``` 85 | 86 | To override any value in the config: 87 | 88 | ```sh 89 | ta-cli publish --release=android --release_notes="my release notes" --git_release_notes=true --git_commit_id=true 90 | ``` 91 | 92 | ## Config path 93 | 94 | Default directories in order: 95 | 96 | 1. input path from `--config=` 97 | 2. .ta-cli.json 98 | 3. $HOME/.ta-cli.json 99 | 100 | ```sh 101 | ta-cli publish --config=ta-cli.json 102 | ``` 103 | 104 | For more info about the list of options: 105 | 106 | ```sh 107 | ta-cli publish -h 108 | ``` 109 | 110 | ## Feedback & Support 111 | 112 | Developers built [TestApp.io](https://testapp.io) to solve the pain of app distribution & feedback for mobile app development teams. 113 | 114 | Join our [community](https://help.testapp.io/faq/join-our-community/) for feedback and support. 115 | 116 | Check out our [Help Center](https://help.testapp.io/) for more info and other integrations. 117 | 118 | Happy releasing 🎉 119 | --------------------------------------------------------------------------------