Open melcarthus opened 1 year ago
One possible issue is regex syntax. PUC uses the provided regex as-is, without adding any delimiters or flags. So if your regex is literally 'landingpages.zip'
, that's not going to work because without delimiters that's not a valid PCRE regex pattern. Try changing it to something like '/landingpages.zip/'
.
Just changed it to a better pattern. Stil points to the main release zip.
That part of the code doesn't have enough logging to effectively debug it remotely. Would you perhaps be willing to step through it yourself or add some logging statements? This is the method that checks if an asset link/name matches the regex:
Sure no problem. However I failed to mention the repo is a private repo. And maybe it cant find this asset because the link contains no token like the default asset link does have. Or am i overthinking it?
The problem it was not pointing to the correct asset was first of all the delimiters. It would still not point to the right assetslink because of two missing files. Why they where missing when I downloaded the plugin i'm not sure about. But everything is working now as intended!
I was missing ReleaseAssetSupport.php
and ReleaseFilteringFeature.php
Ah, it sounds like there was also a PUC version issue. There have been some changes to how release assets work with the update checker, but I forgot that I haven't published those changes as a new release yet. So you might get different behaviour depending on if you used the 5.0
release or the master
branch of this repository.
I'll make a note to release a new PUC version.
When using the gitlab-ci.yml file of mine I can succesfully build releases for my wordpress theme. Each release that I build comes with 5 assets 1 of them being a build package containing no source files (no src/scss/gulp files etc...) that i want to use in the plugin update checker.
I'm calling the enableReleaseAssets and using the name of the zip, 'landingpages.zip' But it falls back to the full release asset.
I read in the documentation about the 3 ways to get an update -tag -release -stablebranche
I want to add tags to my release, but I also want to use the custom release assets.
How am I supposed to setup the update checker so it uses the correct release asset and not just the first one it encounters.
I looks like its not working but maybe because i am using tags in my release the custom release assets are ignored?
I'm kind of stuck and would like some help on this.
The asset link I want to use
https://gitlab.com/api/v4/projects/projectid/packages/generic/landingpages/v4.4.6/landingpages.zip
The (first) asset link it is always pointing to regardless of my enableReleaseAssets calback.
https://gitlab.com/user/landingpages/-/archive/v4.4.6/landingpages-v4.4.6.zip)
Release assets
gitlab-ci.yml