2

When I go to Mac Terminal and execute my sh file with the following command set included, it runs smoothly. When I. allow my crop tab to execute evert hour between 9 am to 18 pm, it says the following exceptions

Fetching origin
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Already up to date.
Already on 'feature/sprint_1'
M   src/Podfile.lock
M   src/MyProject/Info.plist
Your branch is up to date with 'origin/feature/sprint_7'.
bundler: command not found: fastlane
Install missing gem executables with `bundle install`

At my project folder structure, Gemfile and Gemfile.lock exists. Do I need to ..

  1. modify Gemfile before executing my command set?
  2. execute my command with superuser sudo access?
  3. Given bundles and fastlane properly installed, How could I acknowledge my file path to execute is correct?

4.The below is my .sh file with following command set: Should I need to modify my command set also?

cd ~/myProject/src && git stash clear && git fetch --all && git pull && git checkout $1 && bundle exec fastlane ios build build_type:adhoc build_env:dev

Where $1 is my proposed branch e.g. master, release , feature/sprint_1

Jeff Bootsholz
  • 2,971
  • 15
  • 70
  • 141
  • Starting from git you have a warning (which says in a nut shell - you may have unpredictable merge, it means that undesirable changes may occur) and you can handle it here (https://stackoverflow.com/a/62653400/6901693). Then you have the command "fastlane" not found - see here how to fix it https://stackoverflow.com/a/46216913/6901693. And looking at the last one "install mising gem" - try to install all the packages and restart the terminal (more info can be found here https://stackoverflow.com/a/6010234/6901693). Please let me know whether it is enough for you to continue or to fix it. – Utmost Creator Sep 09 '21 at 02:05

1 Answers1

1

According to the last 3 rows of your logs which are:

Your branch is up to date with 'origin/feature/sprint_7'.
bundler: command not found: fastlane
Install missing gem executables with `bundle install`

and your script has cd, and 4 git commands at the beginning. I will assume $1 is master. It is basically like this:

cd ~/myProject/src 
git stash clear
git fetch --all
git pull 
git checkout master # or $1
bundle exec fastlane ios build build_type:adhoc build_env:dev

Bundler says command not found: fastlane and then it shows the solution which is that you need to run bundle install.

Probably when you add bundle install before bundle exec you will resolve your problem:

cd ~/myProject/src 
git stash clear
git fetch --all
git pull 
git checkout master # or $1
bundle install
bundle exec fastlane ios build build_type:adhoc build_env:dev
Muhammed Kılıç
  • 1,271
  • 1
  • 7
  • 21