Capistrano:从两个不同的存储库中签出文件(Capistrano: Checkout files from two different repository)
我在BitBucket中有两个存储库。
一个是我的常规存储库,我想首先部署一个Laravel安装,我想部署分支内的所有文件。
我的问题是,有另一个存储库包含一个文件,它想要签出到服务器中的目录。 该文件是一个我不在本地使用但对服务器必不可少的类。
我不知道如何处理这个问题。
这是我的deploy.rb文件:
#config valid only for current version of Capistrano lock '3.6.1' #require custom config require './config/myconfig.rb' set :stages, ["staging", "production"] set :default_stage, "staging" set :application, '<Application Name>' set :repo_url, '<Url to my First main repo>' set :scm, :git set :branch, 'master' set :user, 'vagrant'
这是我的staging.rb文件:
set :deploy_to, '<Directory to deploy to>' server '<Server name or IP>', user: 'vagrant', roles: %w{app db web} namespace :deploy do desc 'Get stuff ready prior to symlinking' task :compile_assets do on roles(:app), in: :sequence, wait: 1 do execute "cp #{deploy_to}/../components/.env #{release_path}" execute "cp -r #{deploy_to}/../components/vendor #{release_path}" execute "cp -r #{deploy_to}/../components/node_modules #{release_path}" execute "cd #{release_path}; gulp;" end end after :updated, :compile_assets end
如何引入该单个文件(Repo 2中的app / Extentions / TaskOneExtention.php)并将其放入目录(比如Repo 1中的app / Extentions)?
我希望该任务在部署任务之后运行,但使用相同的deploy命令运行。
我真的很感谢一些帮助。
I have two repositories in BitBucket.
One is my normal repository which I would like to deploy with first, a Laravel installation, I would like to deploy all the files within the branch.
My problem is, there is another repository that contains a single file, that would like to checkout to a directory in the server. That file is a class that I don't use locally but is essential for server.
I have no idea how to approach this.
Here is my deploy.rb file:
#config valid only for current version of Capistrano lock '3.6.1' #require custom config require './config/myconfig.rb' set :stages, ["staging", "production"] set :default_stage, "staging" set :application, '<Application Name>' set :repo_url, '<Url to my First main repo>' set :scm, :git set :branch, 'master' set :user, 'vagrant'
Here is my staging.rb file:
set :deploy_to, '<Directory to deploy to>' server '<Server name or IP>', user: 'vagrant', roles: %w{app db web} namespace :deploy do desc 'Get stuff ready prior to symlinking' task :compile_assets do on roles(:app), in: :sequence, wait: 1 do execute "cp #{deploy_to}/../components/.env #{release_path}" execute "cp -r #{deploy_to}/../components/vendor #{release_path}" execute "cp -r #{deploy_to}/../components/node_modules #{release_path}" execute "cd #{release_path}; gulp;" end end after :updated, :compile_assets end
How do I bring in that single file (app/Extentions/TaskOneExtention.php in Repo 2) and put it in a directory (say app/Extentions in Repo 1)?
I would like the task to run after deploy task but run with the same deploy command.
I would really appreciate some help.
原文:https://stackoverflow.com/questions/39409478
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
GL_QUAD绘制三角形(GL_QUAD draws triangle)[2023-12-19]
这个顶点的顺序 [[ 0. -20.23 7. ] [ 0. -20.23 -7. ] [ 100. -10. 5. ] [ 100. -10. -5. ]] 是这样的: 如果要绘制由4个顶点定义的四边形,则需要绘制GL_TRIANGLE_STRIP : def Surfaces(self, vertices): glBegin(GL_TRIANGLE_STRIP) for i in range(4): g ... -
了解用于使用三角形在OpenGL 3.3+核心中绘制四边形的代码(Understanding code used to draw quads in OpenGL 3.3+ core using triangles)[2022-03-03]
glGenBuffers(1, &positionBufferObject); 说“做一个顶点缓冲区对象,并且positionBufferObject是它的ID”。 glBindBuffer(GL_ARRAY_BUFFER, positionBufferObject); 说“ positionBufferObject现在是当前的GL_ARRAY_BUFFER 。” glBufferData(GL_ARRAY_BUFFER, sizeof(vertexPositions), vertexPositions, ... -
OpenGL ES以及桌面OpenGL的核心配置文件仅支持由三角形组成的基本类型。 较早版本的OpenGL支持其他原始类型,如GL_QUADS和GL_POLYGON ,但最近的硬件并不直接支持它们,并且大多数都是冗余的。 除了单独的三角形( GL_TRIANGLES基本类型)之外,还支持三角形条( GL_TRIANGLE_STRIP )和三角形扇形( GL_TRIANGLE_FAN )。 它们允许您绘制连接三角形的集合,而不指定每个三角形的3个顶点。 下图(借用红皮书 )显示了如何从每个这些基本类型的指定顶 ...
-
获取三角形顶点fabricjs(Get triangle vertex fabricjs)[2023-06-18]
在离开这一点之后,我找到了答案。 对于每个形状,Fabric给出标记为oCoords的坐标。 所有要做的就是查看对象的属性(我正在使用Chrome的调试工具),找到oCoords并将它们用于您喜欢的任何内容。 After leaving this alone for a bit, I found the answer. For each shape, Fabric gives of the coordinates, labeled oCoords. All there is to do is look in ... -
您可以在顶点数组中使用一个元素来渲染多个顶点。 它被称为实例顶点属性 。 You can use one element in the vertex array for rendering multiple vertices. It's called instanced vertex attributes.
-
VBOs和索引缓冲区是一个正交的东西。 如果您还没有使用索引缓冲区,也许一次只移动一个步骤会更明智。 所以......关于你的问题。 如果你把所有的三角形风扇都放在一个vbo中,你需要绘制它们的唯一方法就是设置你的vbo,并将其中的索引传递给你的风扇启动 glBindBuffer(GL_VERTEX_BUFFER, buffer); glVertexPointer(3, GL_FLOAT, 0, NULL); // 3 floats per vertex for each i in fan ...
-
鉴于四重ABCD我们可以将其分为ABC, ACD或ABD, DBC 。 比较AC和BD的长度,并使用较短的分割边缘。 换句话说ABC, ACD如果AC较短则使用ABC, ACD ABD, DBC否则使用ABD, DBC 。 Given a quad A B C D we can split it into A B C, A C D or A B D, D B C. Compare the length of A-C and B-D and use the shorter for the splitting ...
-
从用四边形绘制的形状转换为用三角形绘制的形状(Conversion from a shape drawn with quads, to a shape drawn with triangles)[2024-02-04]
假设你有一组顶点{v1,v2,v3,v4,v5,...}并假设你将一个索引列表{i1,i2,i3,i4,i5,...}传递给draw命令,你只需要传递一个不同的索引列表。 如果你之前想通过{i1,i2,i3,i4},现在可以通过{i1,i2,i4,i4,i2,i3}来获得覆盖同一个四边形的两个三角形。 如果你想要粉丝,它会变得更复杂。 你每四个指标做同样的过程。 1 -- 2 1 -- 2 | | becomes | / | | | | / | ...