github发布与分支有关的,正如jitpack所使用的 [英] github releases in relation to branching, as used by jitpack

查看:276
本文介绍了github发布与分支有关的,正如jitpack所使用的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看:

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



它看起来像github特有的,而不是一般的git特性。从我的角度来看,我的用法与分支不同。也就是说,分支 x 只是一个标记。也许bug修复,也许功能添加,不管,也许是实验性的。当然,我是一个非常轻量的git用户,不要使用分支或合并来发挥他们的潜力。



这个特性对于jitpack。而且,对于jitpack如何运作似乎也是至关重要的。为什么?

据我所知,jitpack在repo上创建了一个版本,然后自动地通过jitpack编译JAR并通过maven插件下载。



为什么使用发布功能?起初我将JAR文件上传到发行版,但实际上并不需要。 如何使用github发布作为标记比使用分支更好?事实上,它似乎具有相同的功能,并且从这个意义上说,它复制了分支的功能。



假设有一个基本原理。

解决方案



是的。

这是github特有的,而不是一般的git功能。


从我的角度来看,我的用法与分支不同。也就是说,分支x只是一个标记


不,它不是:一个GitHub版本与一个标签(一个固定标记),而不是分支(HEAD在每次新提交时更改的移动标记)


这个特性对于jitpack来说似乎完全没有用处。而且,对于jitpack如何运作似乎也是至关重要的。为什么?

因为这就是构建的交付方式存储在GitHub上的方式,它与所使用的源的精确版本(通过标签)


为什么使用发布功能?


因为二进制文件本身并不存储在git仓库中(这是版本源代码,而不是二进制文件)。因此,这个版本绑定到一个引用该二进制源代码版本的标签。


如何使用github发布作为标记优于使用分支作为标记?


因为分支不是标记(用于记录源的演变)。<
标记是标记(可以与从标记标记的源构建的交付相关联)




释放分支的概念在 Atlasian gitflow < a>与GitHub版本不一样。


Looking at:

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

it looks like this is specific to github, and not a general git feature. My usage is, from my perspective, no different than branching. That is, branch x is just a marker. 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.

This feature seems totally useless in relation to jitpack. And, yet, seems crucial to how jitpack operates. 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.

Why use the release feature? At first I was uploading JAR files to a release, but that's not actually required. How is using github release as a marker better than using a branch as a marker? 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.

Yes it is.

My usage is, from my perspective, no different than branching. That is, branch x is just a marker

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)

This feature seems totally useless in relation to jitpack. And, yet, seems crucial to how jitpack operates. 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)

Why use the release feature?

Because binaries are not stored in the git repo itself (which is there to version sources, not binaries). 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?

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.

  • One is for recording the versions of sources for a given release 11.1.0, 11.1.1, 11.1.2, and so on.
  • 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发布与分支有关的,正如jitpack所使用的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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