Xcode 12,Mac OS 10.15,用于安装cocoapods的Xcode服务器预集成脚本 我是Xcode服务器CI的新手,这是我的预集成脚本的样子:我触发集成后,集成日志中出现以下问题:我已经重新安装了ruby,将rvm更新为稳定版本,重新安装了cocoapods,这些移动都没有帮助请帮助,谢谢!

问题描述

我是Xcode服务器CI的新手,这是我的预集成脚本的样子:

#!/bin/sh
#make sure the encoding is correct
export LANG=en_US.UTF-8

# fix the path so Ruby can find it's binaries
export PATH=/usr/local/bin:$PATH
echo "PATH: $PATH"

# update or install depending on what we got
if [ -d ${PODS_DIR} ]; then 
    # pods directory exist
    echo "=================="
    echo "   Delete Pods"
    echo "=================="

    # delete cocoapods files if they exist
    rm -rf "${PODS_DIR}"
    eval rm "${BS_SRCROOT}/Podfile.lock"
    eval rm -rf "${BS_SRCROOT}/${BS_EXECUTABLE_NAME}.workspace"
    echo "Deleted Pods directory ${PODS_DIR}"
    echo "Deleted ${BS_EXECUTABLE_NAME}.workspace"
    echo "Deleted Podfile.lock"
else 
    # no need to delete pod files
    echo "Pods NOT detected at ${PODS_DIR}"
fi

echo "=================="
echo "   Install Pods"
echo "=================="

# make sure we are where we need to be
eval cd "${BS_SRCROOT}"
/usr/local/bin/pod install

我触发集成后,集成日志中出现以下问题:

PATH: /usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
==================
   Delete Pods
==================
rm: /Podfile.lock: No such file or directory
Deleted Pods directory 
Deleted .workspace
Deleted Podfile.lock
==================
   Install Pods
==================
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
    from /usr/local/bin/pod:23:in `<main>'
    from /usr/local/bin/ruby_executable_hooks:24:in `eval'
    from /usr/local/bin/ruby_executable_hooks:24:in `<main>'

我已经重新安装了ruby,将rvm更新为稳定版本,重新安装了cocoapods,这些移动都没有帮助

请帮助,谢谢!

解决方法

您必须安装:

<link rel="stylesheet" href="https://fengyuanchen.github.io/datepicker/css/datepicker.css">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="https://fengyuanchen.github.io/datepicker/js/datepicker.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.0/moment.min.js" integrity="sha512-Izh34nqeeR7/nwthfeE0SI3c8uhFSnqxV0sI9TvTcXiFJkMd6fB644O64BRq2P/LA/+7eRvCw4GmLsXksyTHBg==" crossorigin="anonymous"></script>

<div class="col-md-3">
  <input type="text" class="form-control start-date" id="datefrom" placeholder="Date From">
</div>
<div class="col-md-3">
  <input type="text" class="form-control end-date" id="dateto" placeholder="Date To">
</div>

再次运行Xcode Server :) 参考:new Date

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...