-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gitlab generic packages #45
Gitlab generic packages #45
Conversation
46bd619
to
6f56b42
Compare
@marcosnils What do you think about this approach? |
Will check today Sune 🙏
sent from mobile
Em qui, 4 de mar de 2021 04:53, Sune Keller <notifications@github.com>
escreveu:
… @marcosnils <https://github.com/marcosnils> What do you think about this
approach?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#45 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMBLWTTEDCGHLI2TLPDXFTTB44ANANCNFSM4YIKVZYQ>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the uploaded project files made by goreleaser without additional generic uploads
Is this a goreleaser
thing? Or still related to the original gitlab issue?
I think the overall PR is ok. However, for public repos with generic packages, there's no way to force bin
to download Assets if required, right?
Shall we consider both packages and assets as candidates for public repos?
a399a87
to
028a647
Compare
ff0da7d
to
7c41dad
Compare
Merge at will? |
Hey @sirlatrom I'm doing some preliminary tests and I'm getting some weird results. I'm running this command
This is strange, just Another thing that I was thinking that seems the current gitlab provider doesn't support is fectching generic packages from a single release, i.e: |
@marcosnils There are no generic packages because they've chosen not to version their generic packages the same as their tags, e.g. the latest release is v0.0.1110734215291781187721198496291116006578054937833, except from v2.46.1, which looks like the only one. I'll try and change the search order_by to get the largest versions first.
That's an interesting idea, and I think that should be possible to support as well. |
SGTM! |
Turns out that works, and v2.46.1 comes up first, leading to matched packages.
This, it turns out after debugging, is because |
hey @sirlatrom I was checking the last PR against this repository https://gitlab.com/tezos/tezos/-/releases which has both
|
This allows downloads from private repositories where goreleaser/goreleaser#2002 and goreleaser/goreleaser#2005 are used to upload generic packages for a release. On private repositories, the uploaded project files made by goreleaser without additional generic uploads are not accessible through the API but only through a web browser session. Signed-off-by: Sune Keller <absukl@almbrand.dk>
Signed-off-by: Sune Keller <absukl@almbrand.dk>
Also ensures an URL is only added once. Duplicate names are allowed in the GitLab Generic Packages API. Furthermore makes the score of the asset name and URL considered on equal footing, rather than favoritising assets with matches in both name and URL. Signed-off-by: Sune Keller <absukl@almbrand.dk>
Signed-off-by: Sune Keller <absukl@almbrand.dk>
Signed-off-by: Sune Keller <absukl@almbrand.dk>
Maybe this got reverted due to a bad rebase? Who knows. Signed-off-by: Sune Keller <absukl@almbrand.dk>
Signed-off-by: Sune Keller <absukl@almbrand.dk>
Signed-off-by: Sune Keller <absukl@almbrand.dk>
Signed-off-by: Sune Keller <absukl@almbrand.dk>
Also considers when release tags don't include a leading 'v'. Signed-off-by: Sune Keller <absukl@almbrand.dk>
…omponent Signed-off-by: Sune Keller <absukl@almbrand.dk>
Signed-off-by: Sune Keller <absukl@almbrand.dk>
Signed-off-by: Sune Keller <absukl@almbrand.dk>
The PackagesEnabled field is always false when no token is used to get it. Signed-off-by: Sune Keller <absukl@almbrand.dk>
88bca5d
to
234e422
Compare
@marcosnils First of all, kudos for finding a GitLab project that actually has both releases and generic packages! I've been searching through public projects for a while without finding one 😄 It looks like there are more fields that are not set when getting a public project through the API without a token, including the Through 8670d0c I found out that the generic package files in https://gitlab.com/tezos/tezos/-/releases/8.2.0 score lower than the asset links due to the asset links having "Linux" in the name, which adds some extra score points for the OS, which is missing in the generic package file names. |
Hmm makes sense. I guess we're ok now. We can merge this PR and then open issue to support the |
Prefer GitLab Package if found for release version
This allows downloads from private repositories where goreleaser/goreleaser#2002 and goreleaser/goreleaser#2005 are used to upload generic packages for a release.
On private repositories, the uploaded project files made by goreleaser without additional generic uploads are not accessible through the API but only through a web browser session.