frosh/plugin-uploader

一个将 Shopware 插件部署到 store.shopware.com 的工具

0.3.19 2021-11-24 06:16 UTC

README

codecov PHPUnit License GitHub closed pull requests Slack

此工具已废弃,只接受错误修复。请迁移到 https://github.com/FriendsOfShopware/shopware-cli

用于上传新插件发布到 Shopware 商店的工具。需要的环境变量

插件要求

Docker

您也可以使用 Docker。别忘了将您的凭据作为环境变量传递。

示例

❯ docker run --rm -w "/storage" -v (pwd):/storage friendsofshopware/plugin-uploader plugin:validate /storage/FroshAppGoogleSheet.zip

 [OK] Has been successfully validated                                           

Archlinux 用户仓库 (AUR)

使用 AUR 包 php-sw-frosh-plugin-uploader 安装。

CI 集成

有关如何将上传器集成的示例,请参阅 示例 文件夹。

使用命令

ext:upload

将 zip 文件上传到商店并触发代码审查。 插件版本可以部署多次,从而更新版本。

有效参数是

pathToZip - path to the zip file

有效选项是

--skipCodeReview - Skip the Code-Review
--skipCodeReviewResult - Skip waiting for Code-Review Result

ext:update

更新 Shopware 商店中关于插件的信息。对于插件,使用 ${path}/Resources/store-文件夹中的文件。对于应用程序,商店文件夹应直接放置在应用程序的根目录中,即文件夹是 ${path}/store,此外插件名称等也从应用程序的 manifest.xml 中读取。

有效参数是

path - path to the plugin folder

有关 Resources/store 文件夹的更多信息,请参阅 这里

ext:validate

将检查插件是否存在用于代码审查的验证异常。

有效参数是

pathToZip - path to the zip file

有效选项是

--create - Create the plugin in account, if it doesn't exist

ext:list

显示具有 ID、名称、最新版本和最后更改时间的帐户中的所有插件。

ext:download:resources

从商店下载所有存储资源到指定的文件夹。

ext:zip

允许将 git 仓库或插件的文件夹压缩成 zip 文件。

有效参数是

path - path to the directory
branch - Optional: will detect the latest tag, otherwise will use master

有效选项是

--strategy - default `git`. `plain` will zip the folder as it is.
--scope - default `false`. `true` will scope the plugin dependencies into a specific namespace using [humbug/php-scoper](https://github.com/humbug/php-scoper). php-scoper has to be available in `$PATH`

可以使用 .sw-zip-blacklist 文件定义在创建 zip 之前应删除哪些文件。(已弃用,将在 0.4.0 版本中删除

常见问题解答

获取凭据

异常代码