prestashop/publish-on-marketplace

There is no license information available for the latest version (v1.2) of this package.

Publish extensions on the PrestaShop Marketplace

v1.2 2022-08-22 12:17 UTC

This package is auto-updated.

Last update: 2024-10-22 16:57:29 UTC


README

PHP tests

This tool provide an way to upload new versions of extensions on the Marketplace, by using the seller API.

Quickstart

Installation

It may be installed separately from a project, by using the parameter global of a project.

$ composer global require prestashop/publish-on-marketplace

Usage

It requires the following parameters to make a successful upload:

Usage:
  prestashop:marketplace:publish [options]

Options:
      --api-key[=API-KEY]            API Key of the marketplace (Optional if environment variable MARKETPLACE_API_KEY is set)
      --changelog=CHANGELOG          Content of the changelog of the version to upload, or
      --changelog-file=CHANGELOG     Path to the changelog of the version to upload
      --metadata-json=METADATA-JSON  Path to Json file containing details of product
      --archive=ARCHIVE              Path to the archive to upload
      --update-type=UPDATE-TYPE      Type of upgrade (Minor update / Major / new) [default: "updatemin"]
      --debug                        Display additional details
      --dry-run                      Display actions to do without actually running them

Note --metadata-json and --archive needs to be valid paths to your files.

The Json content will be sent as parameters to the Marketplace API. The API signature can be found on Swagger. is an example of metadata Json file for the module ps_checkout:

{
    "id_product" : "46347",
    "technical_name" : "ps_checkout",
    "display_name" : "PrestaShop Checkout",
    "channel" : "stable",
    "product_type" : "module",
    "compatible_from" : "1.6.1.0"
}

An example of command is:

php ../publish-on-marketplace/bin/publish-on-marketplace --api-key=SomeKey --archive=$PWD/ps_checkout-9.9.9.zip --metadata-json=$PWD/metadata.json --changelog="New test release for tool"

Development

Install dependencies with composer. Two CI tools are configured for this project: php-cs-fixer and phpstan

composer install
php vendor/bin/php-cs-fixer fix --no-interaction --dry-run --diff
php phpstan analyse tests/phpstan/phpstan.neon