在操作cron作业时执行Fastlane Command missing Gem



当我转到Mac终端并使用以下命令集执行我的sh文件时,它运行顺利。当我允许我的裁剪选项卡在上午9点到晚上18点之间每小时执行一次时,它会显示以下异常

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`

在我的项目文件夹结构中,存在GemfileGemfile.lock。我需要……吗?

  1. 在执行我的命令集之前修改Gemfile ?
  2. 在超级用户sudo权限下执行我的命令?
  3. 给定bundle和fastlane正确安装,我如何确认我的文件路径执行是正确的?

4。下面是我的.sh文件,其中包含以下命令集:我是否还需要修改我的命令集?

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

其中$1是我建议的分支,例如master, release , feature/sprint_1

根据您的日志的最后3行,即:

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

,脚本开头有cd和4个git命令。我假设1美元是主人。它基本上是这样的:

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说command not found: fastlane,然后它显示了解决方案,即您需要运行bundle install

也许当你在bundle exec之前添加bundle install时,你会解决你的问题:

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

相关内容

  • 没有找到相关文章

最新更新