如何在使用私有git软件包依赖关系的sourcevoid上部署应用程序? [英] How do I deploy application on sourcevoid with private git package dependencies?

查看:98
本文介绍了如何在使用私有git软件包依赖关系的sourcevoid上部署应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sourcevoid 上使用私人git包依赖关系部署应用程序:

 依赖项:
some_package:
git:someprivateurl.git

无法使用,因为 sourcevoid 容器无权访问您的私人git url。

解决方案

部署本地构建的快照,工作原理: / p>

  dart --snapshot = path / to / snapshot path / to / application 
/ pre>

部署快照版本允许 sourcevoid 拉取应用程序,而不需要从私有包repo中拉取源代码。



sourcevoid 应用程序使用镖快照可以在这里找到: https ://github.com/damondouglas/hello-shelf-snapshot 。注意,这个例子并不依赖于一个私有包的仓库,但是工作方式也是一样的。



我建议你保留一个额外的 / code>分支在应用程序repo。 master 中的pubspec引用了私有git repo依赖关系。 build 中的pubspec不会。 sourcevoid 允许您指定在部署时使用git repo的哪个分支,所以我只需指向 build repo。


Deploying an application on sourcevoid with private git package dependencies:

dependencies:
  some_package:
    git: someprivateurl.git

will not work because the sourcevoid container does not have access to your private git url. It can only deploy private repos on github and pull the source just fine.

解决方案

Deploying a snapshot, built locally, works:

dart --snapshot=path/to/snapshot path/to/application

Deploying the snapshot version allows sourcevoid to pull the application without the need to pull the source from the private package repo.

An example of a sourcevoid application using a dart snapshot can be found here: https://github.com/damondouglas/hello-shelf-snapshot. Note, this example doesn't not depend on a private package repo but would work just the same.

I suggest you maintain an additional build branch in the application repo. The pubspec in master references the private git repo dependency. The pubspec in build does not. sourcevoid allows you to specify which branch of a git repo to use when deploying so I would just point to the build repo.

这篇关于如何在使用私有git软件包依赖关系的sourcevoid上部署应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆