Closed LazyKeru closed 4 years ago
Hello @LazyKeru,
just one question - have you published your app (with expo publish
)?
I tried with that script:
expo login --non-interactive -u kallaire -p $EXPO_PASSWORD screen -dm expo start turtle build:android -u kallaire -p $EXPO_PASSWORD --type apk --keystore-path $BITRISEIO_ANDROID_KEYSTORE --keystore-alias $BITRISEIO_ANDROID_KEYSTORE_ALIAS -o "./projects/ExpoProjectAndroid.apk"
I don't know if it's similar too the expo publish. And I got the same error. I'll try using the 'expo publish'
expo start
doesn't publish the app. Try running expo publish
and the issue should go away.
Indeed they are not the same. I think I used it once, but not like it was intended. The expo publish fixed my issue. Thank you for your help and have a nice day :D
@LazyKeru can u help me about how u config turtlecli in bitrise? i follow your workflow , but as always error like this
ERROR: Failed to build standalone app err: Error: Please provide all required credentials - Keystore (with password), Keystore alias and Key password at prepareCredentials (/usr/local/lib/node_modules/turtle-cli/src/bin/commands/build/android.ts:62:13) at /usr/local/lib/node_modules/turtle-cli/src/bin/utils/builder.ts:80:33 at Command.<anonymous> (/usr/local/lib/node_modules/turtle-cli/src/bin/index.ts:23:12) platform: "android"
Hello,
I've changed project and don't have access too the main workflow anymore, so I'm not entirely sure of the exact config for turtle-cli in bitrise. This is one of the first Workflow I made, that worked as of june 15 2020.
here is my simple workflow to Deploy turtle cli, using Android:
deploy-turtle-cli-Android: description: "Deploy turtle cli, using Android" steps: - activate-ssh-key@4: run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' - git-clone@4: {} - npm@1: inputs: - command: install title: Install Saved-Packages - npm@1: inputs: - command: install -g expo-cli title: Install expo-cli - npm@1: inputs: - command: install -g turtle-cli title: Install turtle-cli - file-downloader@1: inputs: - destination: "$BITRISEIO_ANDROID_KEYSTORE" - source: "$BITRISEIO_ANDROID_KEYSTORE_URL" - script@1: inputs: - content: |- #!/usr/bin/env bash # fail if any commands fails set -e # debug log set -x expo login --non-interactive -u $EXPO_USERNAME -p $EXPO_PASSWORD expo publish export EXPO_ANDROID_KEYSTORE_PASSWORD=$BITRISEIO_ANDROID_KEYSTORE_PASSWORD export EXPO_ANDROID_KEY_PASSWORD=$BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD export EXPO_ANDROID_KEYSTORE_ALIAS=$BITRISEIO_ANDROID_KEYSTORE_ALIAS turtle setup:android turtle build:android -u $EXPO_USERNAME -p $EXPO_PASSWORD --type apk --keystore-path $BITRISEIO_ANDROID_KEYSTORE --keystore-alias $BITRISEIO_ANDROID_KEYSTORE_ALIAS -o $TURTLE_CLI_APK_LOCATION - firebase-app-distribution@0: inputs: - service_credentials_file: "$TURTLE_CLI_APK_LOCATION" - app: "$FIREBASE_APP_ID" - app_path: "$TURTLE_CLI_APK_LOCATION" - release_notes: |- BUILD: $BITRISE_BUILD_NUMBER RELEASE: $BITRISE_GIT_BRANCH - firebase_token: "$FIREBASE_TOKEN"
In your workflow Editor, you'll have too add in the code signing segment:
In the secret Environment, you'll also need to add:
In the App Environment Variables:
We use the File Downloader, too have the ANDROID KEYSTORE FILE downloaded on the machine, which will execute turtle build.
The script is very simple (added a few comments):
`expo login --non-interactive -u $EXPO_USERNAME -p $EXPO_PASSWORD #You first have to login expo publish #You publish your project export EXPO_ANDROID_KEYSTORE_PASSWORD=$BITRISEIO_ANDROID_KEYSTORE_PASSWORD export EXPO_ANDROID_KEY_PASSWORD=$BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD export EXPO_ANDROID_KEYSTORE_ALIAS=$BITRISEIO_ANDROID_KEYSTORE_ALIAS #When running the turtle build android, turtle looks automatically for those 3 named variables. turtle setup:android #has to be executed before the build turtle build:android -u $EXPO_USERNAME -p $EXPO_PASSWORD --type apk --keystore-path $BITRISEIO_ANDROID_KEYSTORE --keystore-alias $BITRISEIO_ANDROID_KEYSTORE_ALIAS -o $TURTLE_CLI_APK_LOCATION
After it's execution you can do whatever you want with the APK ($TURTLE_CLI_APK_LOCATION). In this worklow, I publish it to FireBase.
Sorry if I rushed threw my explanation. Don't hesitate to send another message if it wasn't clear, and I'll try to re-work my explanation and go in more detail.
thank you @LazyKeru for helping, but it looks like I can't try it because the build process is actually taking longer. looks like I need a developer plan to try this further
I'll let you know later when I have tried this
New Issue Checklist
yarn global add turtle-cli
ornpm install --global turtle-cli
).Issue Description
I want to use turtle-cli in the bitrise workflow. I'm using it to obtain an android apk build. For now I'm working with a simple expo project, which I prepared according too: https://docs.expo.io/distribution/building-standalone-apps/
I'm sorry if it's just me not using the turtle-cli and epxo-cli right. Thanks in advance for any help you might provide :)
Command executed
script:
turtle setup:android turtle build:android -u kallaire -p $EXPO_PASSWORD --type apk --keystore-path $BITRISEIO_ANDROID_KEYSTORE --keystore-alias $BITRISEIO_ANDROID_KEYSTORE_ALIAS -o "./projects/ExpoProjectAndroid.apk"
Complete output when running turtle, including the stack trace and command used
The YML
Environment
build-log.log