YahnisElsts / plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.
MIT License
2.22k stars 403 forks source link

Update plugin based on the tag instead of the version in the plugin file #521

Closed calebsmithdev closed 1 year ago

calebsmithdev commented 1 year ago

I've got the plugin setup and working great, as long as the version # in the php file is correct. For reference, here is our use case in Github:

Ideally, this makes it so we can release changes from our main branch on demand without needing to push up additional code through the pipeline. It looks like the code here is pulling in the latest tag and I can step through the code to see that, but the version is getting overwritten based on what it sees in the metadata for the PHP file.

Is there a way that I can ignore the branch altogether? I just want it to check for the latest releases.

calebsmithdev commented 1 year ago

Found it! This code snippet was overriding the version based on what it found from the branch, so I'll just go ahead and remove it for now and continue on: https://github.com/YahnisElsts/plugin-update-checker/blob/81be284da76f12c8751b477b2a0fa44364d26f84/Puc/v5p0/Vcs/PluginUpdateChecker.php#L82