7

The Xcode archive step creates this variable: ${BITRISE_DEPLOY_DIR} and read that pilot uses the PILOT_IPA environment variables for the IPA directory.

Is there a way to assign the output (BITRISE_DEPLOY_DIR) to another environment variable (e.g.: $PILOT_IPA)?

JAL
  • 41,701
  • 23
  • 172
  • 300
  • Xcode archive does not create the variable `${BITRISE_DEPLOY_DIR}` however. If you want to deploy your app you can use `${BITRISE_IPA_PATH}` – Warren Parad Sep 27 '16 at 21:29

1 Answers1

11

You can do that by using envman (https://github.com/bitrise-io/envman) which is part of the bitrise CLI tool stack.

To assign the value of an existing Environment Variable (Step outputs are just regular Environment Variables) you can use a Script step, and specify this as the content:

#!/bin/bash

echo "BITRISE_DEPLOY_DIR: $BITRISE_DEPLOY_DIR"
envman add --key PILOT_IPA --value "$BITRISE_DEPLOY_DIR"

This'll first print the value of the BITRISE_DEPLOY_DIR environment variable, and then with envman add it'll add a new environment item with the key PILOT_IPA and the value of $BITRISE_DEPLOY_DIR.

Viktor Benei
  • 3,447
  • 2
  • 28
  • 37