Advice on codeberge hosted sources for a packagist package #12237
Replies: 2 comments
-
@Seldaek any reason why the reference is inside |
Beta Was this translation helpful? Give feedback.
-
Ok so #12266 should fix this by allowing you to use %reference% and have it be populated. Fixing prettyVersion to strip dev-/-dev would be a BC break that does not carry acceptable risk IMO so I'd rather not do that. The better fix though may be to add a CodebergDriver as it seems to be gaining some traction. That'd make sure the dist info is available automatically for those packages. Tracking this in #12267 if anyone wants to help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I've recently been moving a lot of my projects from GitHub to Codeberg.
By default it appears there's no specific codeberg support for packagist/composer, like there is for GitHub, so packages after switching will just act as a git repository only, no (more efficient) dist ZIP download.
I've since added a
dist
property to my composer.json, using a placeholder, like so: https://codeberg.org/danb/HtmlDiff/src/commit/d5cbd43f66c4e512cc0ab71d0e0b07271e7d6af6/composer.json#L32-L35This seems to work well to enable dist downloads in production for most regular version tags (v1.0.4) but it does not work for branch names, due to the
dev
prefix on packagist which then kind breaks the template URL.I'm wondering if there's a better option I've missed?
As an example, I see that packagist adds a
source.reference
to the package, if I could somehow use the source reference in the templatedist.url
that would allow me to download via source/git reference, but I couldn't see that being possible (The reference placeholder relates to thedist.reference
only from my testing).Thanks,
Dan
Beta Was this translation helpful? Give feedback.
All reactions