加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 为什么Travis CI会编辑我的文件?

发布时间:2020-12-17 03:10:42 所属栏目:百科 来源:网络整理
导读:我是Travis CI的新手,我只是想了解为什么以及这里发生了什么.我尽我所能遵循他们的文档中的设置说明.我得到的是: 我在Github上的Rails代码 Travis CI,一旦将其推送到github分支主机,就会构建我的仓库. 一个Heroku应用程序,如果构建成功,Travis CI将部署代码
我是Travis CI的新手,我只是想了解为什么以及这里发生了什么.我尽我所能遵循他们的文档中的设置说明.我得到的是:

>我在Github上的Rails代码
> Travis CI,一旦将其推送到github分支主机,就会构建我的仓库.
>一个Heroku应用程序,如果构建成功,Travis CI将部署代码.

我无法理解的是为什么我在构建完成后得到这个:

HEAD detached from 2a3b308
Changes not staged for commit:
.......
modified:   script/travis.sh

Untracked files:
  (use "git add <file>..." to include in what will be committed)

   vendor/bundle/

no changes added to commit (use "git add" and/or "git commit -a")

我在我的.travis.yml中做了一个before_install: – chmod x script / travis.sh,我在构建日志中得到了chmod x script / travis.sh.我有git版本2.7.4

为什么我的脚本/ travis.sh被编辑?我应该添加这些更改还是我的设置有问题?在脚本/ travis.sh中,我有一些小的命令要在构建之前执行,设置我的Github标识等等.

为什么要添加此文件夹供应商/捆绑包?

解决方法

您需要添加一个git diff步骤来查看更改的性质,但检查您的travis日志:如果您看到

chmod a+x travis.sh

这意味着您的原始travis.sh脚本未添加为可执行文件.

在你的回购中,做一个(用Git 2.9.1+):

git add --chmod=+x script/travis.sh
git commit -m "Make travis.sh executable"
git push

然后再次检查travis是否仍然在构建后将文件显示为已修改.

关于vendor / bundle /,它不是“添加”,只是生成和未跟踪,这意味着您的仓库不会被修改.
见Travis/Cache Bundle

On Ruby and Objective-C projects,installing dependencies via Bundler can make up a large portion of the build duration. Caching the bundle between builds drastically reduces the time a build takes to run.

If you have custom Bundler arguments,and these include the --path option,Travis CI will use that path. If --path is missing but --deployment is present,it will use vendor/bundle.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读