I currently have multiple branded apps. Each app has a dotenv file where several configurations are being manipulated. Example config: .env.Branded_App
PROJECT_PATH = SOME_PROJECT_PATH
ASSET_PATH = SOME_ASSET_PATH
My goal is to use a shell script to automate running each command. For example I want a shell script file to accomplish something like:
comannd 1
command 2
etc
When I run "command 1" individually in my terminal everything is running as expected. Branded_App environment variables are pulled in from the desired config file. Project & asset paths would be passed normally to desired locations.
When I start the shell file with the same command, the shell isn't recognizing the environment variables being passed in. Terminal will ask me for project and asset paths. I believe this is because the shell file is creating a separate shell session when being run?
"fastlane build --env Branded_App" --> This works with the correct environment customizations for "Branded_App" individually in terminal
"fastlane build --env Branded_App" --> Does not run the exact same or pull in environment variables when calling with the shell script
How can I make sure the shell script command produces the same result as running each command individually?