prestashop/publish-on-marketplace

此包的最新版本(v1.2)没有可用的许可证信息。

在PrestaShop市场发布扩展

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

This package is auto-updated.

Last update: 2024-09-22 16:46:26 UTC


README

PHP tests

此工具提供了一种通过卖家API上传扩展新版本到市场的途径。

快速入门

安装

可以通过项目中的global参数单独安装该项目。

$ composer global require prestashop/publish-on-marketplace

用法

为了成功上传,需要以下参数

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

注意:`--metadata-json` 和 `--archive` 需要是您文件的合法路径。

Json内容将被作为参数发送到市场API。Swagger上可以找到API签名。是模块ps_checkout的元数据Json文件的示例。

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

命令示例

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"

开发

使用composer安装依赖项。此项目配置了两个CI工具:php-cs-fixer和phpstan

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