Is there a way to assign the output of a step to another environment variable on Bitrise?
Asked Answered
A

1

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)?

Akmolinsk answered 10/11, 2015 at 9:44 Comment(1)
Xcode archive does not create the variable ${BITRISE_DEPLOY_DIR} however. If you want to deploy your app you can use ${BITRISE_IPA_PATH}Kraal
F
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.

Fasta answered 10/11, 2015 at 14:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.