-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix release tarballs OR attachment naming for better integration with build/dependency systems #18078
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
Comments
Sounds like good suggestions in general. |
-> #9534 |
It's not clear to me how #9534 solves either one of the issues raised in this ticket? Why is this being closed? |
you still can use this it's just not shown on the frontend, because at the moment it's allowed to upload files with same name multible times as attachment .... as soon as this is fixed ... we can switch back |
Hmm, I'm a little unclear on how that'll work as well, but I'll wait and see. |
href="{{$.RepoLink}}/releases/download/{{$release.TagName | PathEscape}}/{{$attachment.Name | PathEscape}}" would work ... but it's not shown as it could have name collisions ... changing the name scheme for auto-generated source tarballs is also possible but would require work also |
Feature Description
When creating a release, gitea creates source tarballs. These have precisely the name of the tag, plus an extension. The root directory in the source tarball is the repository name.
The problem with this scheme is that it's not in line with the unspoken standards of distributing source code. Source tarballs are generally expected to
<projectname>-<release version>
.<projectname>-<release version>.<extension>
Gitea does not produce tarballs according to this pattern. There are a few ways it could improve on this.
Alternatively, you can add custom attachments to a release, e.g. from a
dist
command from your build system. This may create tarballs in the expected format. Unfortunately, these attachments then have a URL that has nothing to do with the file name. Some dependency management systems (e.g. meson expect URLs to also contain the pattern<projectname>-<release version>
, however.Possible solutions include:
<projectname>-<release version>
.<repo-name>-<tagname>
- for projects following the common pattern of using release versions as tag names, this would probably be best.<repo-name>
, etc. You can default to the current behaviour, but also use ones consistent with the expectations of other systems.Screenshots
No response
The text was updated successfully, but these errors were encountered: