📡 Updatifier v1.4.0 ~ Easy to use update checking

Cool! Now for the beginners this should be updated: Plugin Developers · FlibioStudio/Updatifier Wiki · GitHub

1 Like

@Flibio
You can remove the Updatifier API class shading in plugins and the 01 hack for SpongeVanilla from the main post, as of the new API release SpongeVanilla fully supports plugin dependencies.

Thanks for letting me know!

The latest version of Updatifier has had its config file moved to config/me.flibio.updatifier/me.flibio.updatifier.conf. This is due to a recent change in the Sponge API. Please let me know if the new location is ok, or if I should relocate to somewhere else.

Plugin Developers

Currently developers use either the @Updatifier annotation or the UpdatifierService service. It was a good idea back when it was introduced. However it had some restrictions:

  • Developers need to explicitly depend on Updatifier to have the 2 classes available.
  • It is restrictive as currently only GitHub checking is available. If (suppose) BitBucket support was to be added, the current system would have to break, as now developers have to choose between the two services from where they can allow downloading from.
    • Extending from this, suppose that both services were provided (maybe as a backup), then there is no priority system. Granted an option can be added to fix that, it again breaks the current functionality.

So yesterday I came up with a new system. This will yes break the previous system, but is much more flexible than the current one.

Thanks to @windy’s Asset API, we can now have an asset in each plugin called updatifier.conf with a structure similar to:

############################
# Support for Ore
############################
# Basically a true or false. Since all
# plugins have a unique id on ore,
# this will allow just that one line
# and plugins can get updates.
############################
ore : true
############################
# Support for GitHub
############################
# Same as the annotation/ service
############################
github : {
    repoOwner: <user/org>
    repoName: <repo>
    version: <version>
}

Note this is a draft format and not in anyway final.

This format is better as

  • No need to depend on Updatifier.
  • More services can be added without breaking existing service implementation.
  • If updatifier is not present on the server then no chance of errors

This is where you,as plugin devs come in. We want your input in how this file is laid out. You can leave your comments at the github issue or here.

As this will be a breaking change it will be released under 2.0.0


Server Owners

I know previously @Flibio changed the location of the config file from config/updatifier/updatifier.conf to config/me.flibio.updatifier/me.flibio.updatifier.conf. However the plugin id naming convention was recently changed again and soon updatifier will revert the location of the config again. Just an advance warning about it :wink:


If you have read all of that, you are a champ :thumbsup:

4 Likes

Update to the new format:

  • I have decided to switch from HOCON to JSON.
  • The layout has changed a bit, for example here is updatifier’s updatifier.json :
{
    "sources" : [
        {
            "type" : "github",
            "payload" : {
                "owner" : "FlibioStudio",
                "name"  : "Updatifier",
                "meta" : {
                    "prefix" : "v"
                }
            }
        }
    ]
}
  • The sources is a list of the types of services that are supported, ordered by priority that Updatifier checks for updates. Currently, the only type available is github. The payload is unique to each service. For github:
    • The owner and name are required and meta is optional.
    • The owner and name are mapped as follows: https://github.com/<owner>/<name>
    • The meta has url formatting information and is entirely optional. The valid keys for it are prefix, suffix, version
2 Likes

Is it possible to consider the version of the API? For example I have a server 4.x, but Updatifier to announce the release of a new plugin, but did not report what version of the API.

1 Like

With ore entering beta and functional state, this plugin has been discontinued. @Flibio if you can say it so this topic can be locked.

Yep, the Ore system is a welcome addition and an official Ore plugin is already available. It’s safe to close this topic and discontinue the plugin.

Closing this topic as per the request of @Flibio.