aquaproj / aqua

Declarative CLI Version manager written in Go. Support Lazy Install, Registry, and continuous update with Renovate. CLI version is switched seamlessly
https://aquaproj.github.io
884 stars 39 forks source link

Support artifact downloading from major Git hosters #1359

Open CrystalMethod opened 2 years ago

CrystalMethod commented 2 years ago

Feature Overview

Probably all Git hosters have a "release artifact" feature. Aqua should support the major platforms natively, although the importance of these platforms is certainly far behind Github. (Gitlab, Gitea, ...) It should be considered that these alternatives usually have a public service but can also be self-hosted using a custom domain.

Example Code

command and configuration

packages:
    - type: gitea_release
      ...
CrystalMethod commented 2 years ago

If this is something to consider for an enhancement, I would be interested in a first implementation (even though I don't really have much experience with Golang yet)

suzuki-shunsuke commented 2 years ago

Git Servers

suzuki-shunsuke commented 2 years ago

Renovate Datasource

https://docs.renovatebot.com/modules/datasource/

suzuki-shunsuke commented 2 years ago

Thank you for your proposal.

I think most of major tools are hosted at GitHub, so the support of other platform isn't so important. And I haven't used other than GitHub, so I'm not familiar with them. By supporting other platform, aqua would become more complicated internally. When we develop aqua, we always have to take care not only GitHub but also other platform. The maintenance, troubleshooting, user support, and CI would become hard.

So I have no motivation to support them at the moment.

But aqua still can support other platform by the package type http, though there are some restriction.

Namespace of package names

When we add packages hosted by other than GitHub to aqua-registry, we have to consider the namespace of the package names to avoid the package name conflict. To update packages for other than GitHub by aqua-renovate-config, we have to set the prefix to distinguish Renovate datasource.

For example, the prefix gitlab: can be used for GitLab (Note that this is just an idea).

aqua.yaml

packages:
- name: gitlab:<owner>/<repo>

renovate.json

{
  "regexManagers": [
    {
      "fileMatch": ["\\.?aqua\\.ya?ml"],
      "matchStrings": [
        " +['\"]?name['\"]? *: +['\"]?gitlab:(?<depName>[^'\" .@/\\n]+/[^'\" @/\\n]+)(/[^'\" /@\\n]+)*@(?<currentValue>[^'\" \\n]+)['\"]?"
      ],
      "datasourceTemplate": "gitlab-releases"
    },
  ]
}
suzuki-shunsuke commented 1 year ago
suzuki-shunsuke commented 9 months ago

For example, the prefix gitlab: can be used for GitLab (Note that this is just an idea).

gitlab.com/ is also available because . is unavailable in GitHub Org name.

suzuki-shunsuke commented 9 months ago
suzuki-shunsuke commented 9 months ago

aqua-registry v4.128.0 and aqua-renovate-config 2.0.0 are out 🎉

The namespaces for gitlab.com and gitea.com were open. And renovate-config-preset supported gitlab.com and gitea.com.

aqua itself doesn't support gitlab.com and gitea.com yet.