Skip to content
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

Registry format / layout #18

Open
awvwgk opened this issue Sep 14, 2020 · 2 comments
Open

Registry format / layout #18

awvwgk opened this issue Sep 14, 2020 · 2 comments

Comments

@awvwgk
Copy link
Member

awvwgk commented Sep 14, 2020

I just checked out this registry for fpm and noticed some rough edges. It is somewhat related to #1, but maybe worth a separate issue.

Specifying a project with multiple releases quickly gets redundant, imagine a package which releases on a regular basis, keeping the registry data up-to-date will quickly become a copy-and-paste approach

[project-name]
"1" = {git="https://github.com/project-name/project-name", tag="v1"}
"2" = {git="https://github.com/project-name/project-name", tag="v2"}
"2.1" = {git="https://github.com/user-name/project-name", tag="v2-server.1"}
"3" = {git="https://github.com/project-name/project-name", tag="v3"}
"3.1" = {git="https://github.com/project-name/project-name", tag="v3.1"}
"4" = {git="https://github.com/project-name/project-name", tag="v4"}
"latest" = {git="https://github.com/project-name/project-name", branch="main"}

A slight improvement in my opinion would be to allow specifying the upstream URL in the project section and allow to overwrite it per version basis.

[project-name]
git = "https://github.com/project-name/project-name"
"1" = {tag="v1"}
"2" = {tag="v2"}
"2.1" = {git="https://github.com/user-name/project-name", tag="v2-server.1"}
"3" = {tag="v3"}
"3.1" = {tag="v3.1"}
"4" = {tag="v4"}
latest.branch = "main"
@certik
Copy link
Member

certik commented Sep 14, 2020

The other idea I had was that it would automatically convert the version number "3.1" to a tag "v3.1". But others thought that might be too fragile, so we haven't implemented it. I still think it's a good idea to make this simpler and we should implement it. Your example could become:

[project-name]
git = "https://github.com/project-name/project-name"
version_tags = ["1", "2", "3", "3.1", "4"]
"2.1" = {git="https://github.com/user-name/project-name", tag="v2-server.1"}
latest.branch = "main"

@awvwgk
Copy link
Member Author

awvwgk commented Sep 14, 2020

It is not clear if a version number will always match the version tag with a v prefixed, some projects use just the version number as a tag, some always prefix with v or with the project name. I even saw projects switching between releases back and forth. No doubt this would be fragile. But the other way round, specifying the tag as target and extracting the version number from the fpm.toml would certainly work, the registry has to fetch the package file anyway for validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants