repman icon indicating copy to clipboard operation
repman copied to clipboard

Support packages where the version numbers are available via an 3rd party API

Open akondas opened this issue 4 years ago • 0 comments

An example of such package would be the no-content package from WordPress which only contains the WordPress files you need to be able to install WordPress using composer.

{
  packages: {
    example/wordpress-no-content: {
      "%VERSION%": {
        "name": "example/wordpress-no-content",
        "version": "%VERSION%",
        "dist": {
          "type": "zip",
          "url": "https://downloads.wordpress.org/release/wordpress-%VERSION%-no-content.zip"
        },
        require: {
          johnpbloch/wordpress-core-installer: "^1.0"
        },
        type: "wordpress-core"
      }
    }
  }
}
Where %VERSION% is the specific WordPress version.

The API for the latest version numbers is available from https://api.wordpress.org/core/version-check/1.7/

Would there be a way to automatically get the latest versions from the API, add those versions to some kind of storage/DB, and have the repository list all available versions, without having to fork the project? (even if it requires custom code to obtain and store the available versions)

akondas avatar Apr 23 '20 10:04 akondas