简体   繁体   English

与 jitpack 使用的分支相关的 github 版本

[英]github releases in relation to branching, as used by jitpack

Looking at:看着:

https://help.github.com/articles/about-releases/ https://help.github.com/articles/about-releases/

it looks like this is specific to github, and not a general git feature.看起来这是特定于 github 的,而不是通用的 git 功能。 My usage is, from my perspective, no different than branching.从我的角度来看,我的用法与分支没有什么不同。 That is, branch x is just a marker.也就是说,分支x只是一个标记。 Maybe bug fixes, maybe feature added, whatever, maybe experimental.也许修复了错误,也许添加了功能,无论如何,也许是实验性的。 Granted, I'm a very light user of git, and don't use branching, nor merging, to their full potential.诚然,我是 git 的一个非常轻量级的用户,并且不使用分支,也不使用合并,以发挥其全部潜力。

This feature seems totally useless in relation to jitpack.这个特性对于 jitpack 来说似乎完全没用。 And, yet, seems crucial to how jitpack operates.然而,似乎对 jitpack 的运作方式至关重要。 Why?为什么?

As I understand jitpack, a release is created on a repo, and then, automagically, a JAR is compiled by jitpack and made available for download through the maven plugin.据我所知,jitpack 是在 repo 上创建一个版本,然后,jitpack 自动编译一个 JAR,并可以通过 maven 插件下载。

Why use the release feature?为什么要使用发布功能? At first I was uploading JAR files to a release, but that's not actually required.起初我将 JAR 文件上传到一个版本,但这实际上并不是必需的。 How is using github release as a marker better than using a branch as a marker?如何使用 github release 作为标记比使用分支作为标记更好? In fact, it seems to serve the same function, and, in that sense, duplicates the functionality of a branch.事实上,它似乎服务于相同的功能,从这个意义上说,它复制了一个分支的功能。

Presumably, there's a rationale.想必,是有道理的。

it looks like this is specific to github, and not a general git feature.看起来这是特定于 github 的,而不是通用的 git 功能。

Yes it is.是的。

My usage is, from my perspective, no different than branching.从我的角度来看,我的用法与分支没有什么不同。 That is, branch x is just a marker也就是说,分支 x 只是一个标记

No, it is not: a GitHub release is associated to a tag (a fixed marker), not a branch (a shifting marker whose HEAD changes at each new commit)不,它不是:GitHub 版本与标签(固定标记)相关联,而不是与分支(在每次新提交时 HEAD 发生变化的移动标记)相关联

This feature seems totally useless in relation to jitpack.这个特性对于 jitpack 来说似乎完全没用。 And, yet, seems crucial to how jitpack operates.然而,似乎对 jitpack 的运作方式至关重要。 Why?为什么?

Because that is how the delivery built is stored on GitHub, with a relation to a precise version of the sources which were used to build said delivery (through the tag)因为这就是构建的交付存储在 GitHub 上的方式,与用于构建所述交付的源的精确版本相关(通过标签)

Why use the release feature?为什么要使用发布功能?

Because binaries are not stored in the git repo itself (which is there to version sources, not binaries).因为二进制文件不存储在 git repo 本身中(它用于版本源,而不是二进制文件)。 Hence the release, tied to a tag referencing the version of the sources for that binary.因此,发布与引用该二进制文件源版本的标签相关联。

How is using github release as a marker better than using a branch as a marker?如何使用 github release 作为标记比使用分支作为标记更好?

Because a branch is not a marker (and is used to record the evolution of sources).因为分支不是标记(并且用于记录源的演变)。
A tag is a marker (and can be associated to the deliveries built from the sources marked by said tag)标签是一个标记(并且可以与从由所述标签标记的来源构建的交付相关联)


The notion of "release branch" described in " Atlasian gitflow " is not the same as the GitHub release. Atlasian gitflow ”中描述的“发布分支”的概念与GitHub发布不同。

  • One is for recording the versions of sources for a given release 11.1.0, 11.1.1, 11.1.2, and so on.一种用于记录给定版本 11.1.0、11.1.1、11.1.2 等的源版本。
  • The other is for associating binaries to a tag on the GitHub site in order to allow user of the repo to not have to compile the source (and to avoid to store that same binary in the repo itself, making it too big to be easily cloned)另一个是将二进制文件与 GitHub 站点上的标签相关联,以允许 repo 的用户不必编译源代码(并避免将相同的二进制文件存储在 repo 本身中,使其太大而无法轻松克隆) )

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM