使用包或框架时是否有使用版本控制的标准方法?

发布于 2024-08-27 10:10:29 字数 288 浏览 6 评论 0原文

即,您是否将整个包放在 VCS 下,还是仅将您正在编程的组件放在下面?软件包本质上会升级,代码需要添加到 VCS 中,而且还有很多静态代码。

具体来说,我将致力于 Joomla,添加和构建模块,定制模块以及外观。最初只有我一个人,但随着项目的推进,可能会扩展到另外两名开发人员。我的反应只是 VCS,这意味着我知道一切都在那里,并且通过 CI 进行部署更容易(?)。

另一种方法是排除大部分未更改的代码,这可能容易出错且费力。

由于对此没有具体的答案,并且我正在寻找经验或最佳实践建议,因此我已将其标记为社区维基。

i.e. Do you put the whole package under VCS or just the components you are programming? Packages by there nature will get upgraded and that code will need to be added into the VCS, plus there is a lot of code that is static.

Specifically I am going to be working on Joomla, adding and building modules, customising modules and the look and feel. Initially this will be just me but will expand to possibly two more developers as the project ramps up. My reaction would be just to VCS the lot, it means that i know it is all there and deployment via CI is easier(?).

The alternative is to exclude the bulk of the code that is not being altered which could be error prone and laborious.

As there is not a specific answer for this and i am looking for either experience or best practice advice i have marked it community wiki.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逆光下的微笑 2024-09-03 10:10:29

我通常会做两件事之一(我使用 SVN):

  • 将库/框架的发布版本(无 SCM 元数据)放在 SVN 存储库的单独文件夹中。这样我就知道代码是稳定的,如果某些东西停止工作,那不是因为框架的更改,而是因为我自己的错误(并且可以很容易地由我修复)。
  • 使用 svn:externals > 从库/框架的官方SVN自动更新。这不太安全,但有时很好,特别是当您是库/框架的贡献者并且可以修复自己可能出现的错误时。

如果您正在使用 SVN,并且想要使用外部文件,请执行以下操作:

svn propset svn:externals "foldername http://libdomain.com/svn/trunk" libs

...其中 libs 是您的库文件夹(将在其中设置此 SVN 属性),foldername 是应放置此特定库的子文件夹的名称。

I usually do one of two things (I use SVN):

  • Put a release version (no SCM meta-data) of the library/framework in a separate folder in my SVN repository. That way I know that the code is stable, and if something stops working, it's not because of changes to the framework, but instead my own fault (and can easily be fixed by me.)
  • Use svn:externals to automatically update from the official SVN of the library/framework. This is less safe, but is sometimes nice, especially when you are a contributor to the library/framework and can fix bugs that may occur yourself.

If you're using SVN, and want to use externals, do this:

svn propset svn:externals "foldername http://libdomain.com/svn/trunk" libs

...where libs is your library folder (onto which this SVN property will get set), and foldername is the name of the sub-folder in which this particular library should be placed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文