PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, August 21, 2022

[FIXED] how to export a fastlane env to the main shell environment?

 August 21, 2022     bash, environment-variables, fastlane, fastlane-match, provisioning-profile     No comments   

Issue

I have a CI setup on bitrise that's sort of like this:

# first script
fastlane match appstore
# second script
bash mycommands.sh

Now mycommands.sh needs access to one of the outputs of the first script, specifically the UDID of the provisioning profile that was pulled. If I do the match step inside a lane, the UDID would be available as ENV['sigh_com.******_development'], but it's not available to the environment outside the first script. So how can I make it available to commands that run after the first script has completed? Thanks!


Solution

One option is to wrap both within a fastlane lane:

Fastfile:

lane :do_something do |options|
  match(type: 'appstore')
  sh "mycommands.sh"
end

Quick'n'dirty way (I REALLY don't recommend relying on this as it's fragile for a number of reasons, but if you need this for something quick):

fastlane match appstore | grep 'Profile UUID' | awk '{ print $7 }'


Answered By - danielbeard
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing